title: Boost::Asio : io_service.run() vs poll() or how do I integrate boost::asio in mainloop
body: <p>I am currently trying to use boost::asio for some simple tcp networking for the first time, and I allready came across something I am not really sure how to deal with. As far as I understand io_service.run() method is basically a loop which runs until there is nothing more left to do, which means it will run until I release my little server object. Since I allready got some sort of mainloop set up, I would rather like to update the networking loop manually from there just for the sake of simplicity, and I think io_service.poll() would do what I want, sort of like this:</p>
  
  <pre><code>void myApplication::update()
  {
       myIoService.poll();
       //do other stuff
  }
  </code></pre>
  
  <p>This seems to work, but I am still wondering if there is a drawback from this method since that does not seem to be the common way to deal with boost::asios io services. Is this a valid approach or should I rather use io_service.run() in a non blocking extra thread?</p>