title: How to execute async operations sequentially with c++ boost::asio?
body: <p>I would like to have a way to add async tasks form multiple threads and execute them sequentially in a c++ boost::asio application.</p>
  
  <p><strong>Update:</strong> I would like to make a server-to-server communication with only one persistent socket between them and I need to sequence the multiple requests trough it. It needs to keep the incoming request in a queue, fire the top one / wait for it response and pick up the next.    I'm trying to avoid using <a href="http://www.zeromq.org/" rel="nofollow">zeromq</a> because it needs a dedicated thread.</p>
  
  <p><strong>Update2:</strong> Ok, Here is with what I ended up: The concurrent worker threads are "queued" for the use of the server-to-server socket with a simple mutex. The communication is blocking write/wait for response/read then release the mutex. Simple isn't it :)</p>