문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top