Does boost::asio::io_service preserve the order of handlers? Does boost::asio::io_service preserve the order of handlers? multithreading multithreading

Does boost::asio::io_service preserve the order of handlers?


afaik if you want guaranteed ordering of post handler execution you have to use strand as described in the docs.


The current implementation does execute things in the sequence you post them, but ordering is only guaranteed for handlers that are explicitly post()ed through a strand.