Use the thread's private_op_queue for handlers returned by the reactor task. This fixes a problem where signal_set handlers are not being called when the io_service's concurrency hint is set to 1.
diff --git a/asio/include/asio/detail/impl/task_io_service.ipp b/asio/include/asio/detail/impl/task_io_service.ipp index 6b3b247..c5b0f08 100755 --- a/asio/include/asio/detail/impl/task_io_service.ipp +++ b/asio/include/asio/detail/impl/task_io_service.ipp
@@ -368,14 +368,13 @@ else lock.unlock(); - op_queue<operation> completed_ops; - task_cleanup on_exit = { this, &lock, &completed_ops }; + task_cleanup on_exit = { this, &lock, &private_op_queue }; (void)on_exit; // Run the task. May throw an exception. Only block if the operation // queue is empty and we're not polling, otherwise we want to return // as soon as possible. - task_->run(!more_handlers, completed_ops); + task_->run(!more_handlers, private_op_queue); } else { @@ -422,14 +421,13 @@ lock.unlock(); { - op_queue<operation> completed_ops; - task_cleanup c = { this, &lock, &completed_ops }; + task_cleanup c = { this, &lock, &private_op_queue }; (void)c; // Run the task. May throw an exception. Only block if the operation // queue is empty and we're not polling, otherwise we want to return // as soon as possible. - task_->run(false, completed_ops); + task_->run(false, private_op_queue); } o = op_queue_.front();