概述
新版 ASIO 必须以 asio::io_context
替换 asio::io_service
- io_context -> io_service
- io_context.post() -> io_context.get_executor().post()
- io_context.dispatch() -> io_context.get_executor().dispatch()
- io_context::strand -> strand<io_context::executor_type>
there were also changes to composed operation customization hooks - there are only 2 now - boost::asio::associated_allocator
and boost::asio::associated_executor
, which default to looking for get_allocator()
, get_executor()
, T::allocator_type
, T::executor_type
members of the composed operation function object.
This is not a complete list.
最后
以上就是淡定导师为你收集整理的asio::io_service被废弃的问题的全部内容,希望文章能够帮你解决asio::io_service被废弃的问题所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复