I'm trying to work out how the io_service.run() function operates in a client. This is somewhat related to this question but on the other end of the connection. In a client situation there is no accept handler so when will the io_service.run()
return?
Ideally I want to run it once (per thread, as I understand it, correction welcome, each thread that calls io_service.run()
is basically added to the io_service thread pool) then send lots of requests without needing to call reset
, run
again. There will be gaps in the requests being sent when the io_service will have no work to do but the occurrence of those gaps is largely non-deterministic, based on user behavior.