Does boost::asio::io_service
guarantee that handlers are called in the same order that they are given via post()
? I can't find anything saying this in the documentation. Assume that calls to io_service::post
are serialized.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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
.
回答2:
afaik if you want guaranteed ordering of post
handler execution you have to use strand
as described in the docs.