是否提高:: ASIO :: io_service对象preserve处理的顺序? [英] Does boost::asio::io_service preserve the order of handlers?

查看:178
本文介绍了是否提高:: ASIO :: io_service对象preserve处理的顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请问<一个href=\"http://www.boost.org/doc/libs/release/doc/html/boost_asio/reference/io_service.html\"><$c$c>boost::asio::io_service保证处理被称为以相同的顺序,它们经由<给定href=\"http://www.boost.org/doc/libs/release/doc/html/boost_asio/reference/io_service/post.html\"><$c$c>post()?我找不到任何文档中这样说。假设io_service对象::后的序列化调用

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.

此外,这是我的第一个问题在这里。请让我知道,如果我做任何愚蠢的事。

Also, this is my first question here. Please let me know if I'm doing anything stupid.

推荐答案

目前的实现做了你张贴的顺序执行的东西,但排序只保证处理程序明确后()通过<$ C $编C>链

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.

这篇关于是否提高:: ASIO :: io_service对象preserve处理的顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆