title: Read child process stdout in a separate thread with BOOST process
body: <p>I have a main program that uses boost process library to spawn a child process that prints </p>
  
  <pre><code>Hello World !
  </code></pre>
  
  <p>on its stdout every 5 seconds.</p>
  
  <p>I would like to read/monitor the stdout of the child process in the main process when it becomes available along with performing other operations within the main program. </p>
  
  <p>I have tried out the examples for <code>boost asynchronous IO</code> (<a href="http://www.boost.org/doc/libs/1_66_0/doc/html/boost_process/tutorial.html" rel="nofollow noreferrer">http://www.boost.org/doc/libs/1_66_0/doc/html/boost_process/tutorial.html</a>) but all these seem to block the main program until the child process has exited. </p>
  
  <p>Do we need to read the childs stdout in a separate thread ? Can someone please provide an example where the main program can do other things at the same time instead of blocking for stdout from th child ?</p>