新版 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.












网友评论