Setting limit on post queue size with Boost Asio?

后端 未结 4 1672
慢半拍i
慢半拍i 2021-02-20 18:09

I\'m using boost::asio::io_service as a basic thread pool. Some threads get added to io_service, the main thread starts posting handlers, the worker threads start r

4条回答
  •  滥情空心
    2021-02-20 18:44

    Maybe try lowering the priority of the main thread so that once the worker threads get busy they starve the main thread and the system self limits.

提交回复
热议问题