美文网首页
asio::io_service被废弃的问题

asio::io_service被废弃的问题

作者: 阿群1986 | 来源:发表于2019-06-14 20:57 被阅读0次

    新版 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被废弃的问题

          本文链接:https://www.haomeiwen.com/subject/qujmfctx.html