One can add task with post() but how to clear all the pool in the io_service? (so it stops processing any task and clears the pool)
Asked
Active
Viewed 176 times
0
-
This very detailed answer may help: [Confused when boost::asio::io_service run method blocks/unblocks](http://stackoverflow.com/questions/15568100/confused-when-boostasioio-service-run-method-blocks-unblocks). – mins Apr 08 '15 at 18:46
1 Answers
1
The linked answer has all the details: Confused when boost::asio::io_service run method blocks/unblocks
The short story: stop()
stops processing tasks from the queue(s) (any handlers are not interrupted of course).
reset()
prepares the io_service
for re-use.
-
@mimosa11 Read carefully this answer, again and again until you really understand it, and so you will learn easily asio, one of the most valuable libraries. – Jean Davy Apr 09 '15 at 20:05