boost::asio::io_service 有界 and/or 优先级队列?
boost::asio::io_service with a bounded and/or priority queue?
查看 task_io_service.ipp,似乎 io_service 在后台使用 FIFO 队列来存储其任务。 (如果我错了请纠正我)。
有没有什么好的方法可以使用io_service的优先级队列来代替内置的FIFO?理想情况下,我正在寻找一种偷偷摸摸的方式将自定义任务队列走私到 io_service.
非常感谢。
有一个示例:
Invocation
This example shows how to customise handler invocation. Completion handlers are added to a priority queue rather than executed immediately.
查看 task_io_service.ipp,似乎 io_service 在后台使用 FIFO 队列来存储其任务。 (如果我错了请纠正我)。
有没有什么好的方法可以使用io_service的优先级队列来代替内置的FIFO?理想情况下,我正在寻找一种偷偷摸摸的方式将自定义任务队列走私到 io_service.
非常感谢。
有一个示例:
Invocation
This example shows how to customise handler invocation. Completion handlers are added to a priority queue rather than executed immediately.