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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user