2
0
mirror of https://github.com/boostorg/thread.git synced 2026-02-08 11:12:23 +00:00

Fixing lost notification bugs, part 1

- Updated all of the functions in all of the condition variable classes to ensure that they don't lose notifications
- Re-enabled notification tests
This commit is contained in:
Austin Beer
2017-10-04 22:56:06 -06:00
parent 3b5d0c8d7f
commit 7069c97a8b
5 changed files with 399 additions and 263 deletions

View File

@@ -361,11 +361,12 @@ namespace boost
unique_lock<mutex> lock(local_thread_info->data_mutex);
while(!local_thread_info->done)
{
if(!local_thread_info->done_condition.do_wait_until(lock,timeout))
{
res=false;
return true;
}
if(!local_thread_info->done_condition.do_wait_until(lock,timeout)) break; // timeout occurred
}
if(!local_thread_info->done)
{
res=false;
return true;
}
do_join=!local_thread_info->join_started;