【发布时间】:2013-02-05 12:56:32
【问题描述】:
当使用 boost::asio 进行一些异步 TCP 通信时,我注意到它启动了很多 (3-4) 个内部线程。阅读the documentation,它说
"The implementation of this library for a particular platform may
make use of one or more internal threads to emulate asynchronicity"
现在我的库有非常严格的要求,不能启动任何额外的线程(客户端提供的线程除外,现在启动io_service::run())。有什么方法可以阻止 boost::asio 创建这些额外的线程?
或者,是否有任何其他只能在一个线程中运行的异步库?
【问题讨论】:
标签: c++ boost tcp boost-asio