mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-12 22:17:47 +00:00
[Support] Fix race in threading test, found by TSan
This commit is contained in:
parent
55630191a3
commit
0fbf4f0211
@ -32,8 +32,10 @@ public:
|
||||
{
|
||||
std::lock_guard<std::mutex> Lock(M);
|
||||
Notified = true;
|
||||
// Broadcast with the lock held, so it's safe to destroy the Notification
|
||||
// after wait() returns.
|
||||
CV.notify_all();
|
||||
}
|
||||
CV.notify_all();
|
||||
}
|
||||
|
||||
bool wait() {
|
||||
|
Loading…
Reference in New Issue
Block a user