boostorg / thread

Boost.org thread module
http://boost.org/libs/thread
199 stars 161 forks source link

execution_monitor::use_mutex sleeps the whole timeout duration #243

Closed Kojoley closed 5 years ago

Kojoley commented 5 years ago

Instead of sleeping the whole timeout duration, sleep for 500ms in a loop and check every iteration if the job was already done.

viboes commented 5 years ago

I was not aware this code could be something that could delay the execution. Thanks for the PR