title: guidance with input filter for TBB Pipeline library
body: <p>In my previous question, I implemented a TBB Pipeline using C++ (Linux) with Input, Transform and Output filters:</p>
  
  <p><strong><a href="https://stackoverflow.com/questions/23356308/incorrect-output-with-tbb-pipeline">incorrect output with TBB pipeline</a></strong></p>
  
  <p>The Input filter was reading data (C structure) from text files and was passing to Transform filter. The Transform filter was updating data and passing it to Output filter. The Output filter was storing it back on the disc. A simple read and write application.</p>
  
  <p>Now, I am looking to create a MAIN application. The MAIN application will create a TBB Pipeline with three filters in the start:</p>
  
  <ol>
  <li>InputFilter :    Receive data/C structure from the main application and pass it on.</li>
  <li>TransformFilter: Do some processing.</li>
  <li><p>OutputFilter :   Receive it and return the information back to the main application. </p>
  
  <p>In the start, InputFilter will not do anything as data/C Structure will be empty. So it will be looping or waiting.</p>
  
  <p>The MAIN application will read data from the file and will pass the information to the InputFilter (if required). The InputFilter will then process it and pass it to the next filter and so on. So the different is that :</p>
  
  <p><em>Input is controlled by the MAIN application not with in the InputFilter (as I did before). One way can be to pass data/ C structure by reference to the InputFilter and then update it via MAIN application. But problem is:</em></p>
  
  <p><strong>The control is never returned from InputFilter to the MAIN application. Any help will be really appreciated ! !</strong>  </p></li>
  </ol>