This happens automatically: io_service::run
will automatically unblock once all work has been completed (and no new work is added). This is provided that you do not use an io_service::work
object.
How to stop boost asio io_service and finish all posted handlers?
-
15-06-2023 - |
Question
Looks like the io_service::stop()
only let the run()
return. And the io_service::~io_service
will destroy all the handlers.
Is there a way to let io_service
finish all the queued handlers and then stop?
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow