summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
efc0750)
Summary:
Do the barrier completion test in a loop. (std::condition_variable has pthreads-style spurious wakeups).
(Sorry for missing this in review).
Reviewed By: djwatson
Differential Revision:
D4302035
fbshipit-source-id:
3322d6a0ffba8c47c46bafb1d88034e1a0a9c652
if (++num_ == count_) {
cv_.notify_all();
} else {
if (++num_ == count_) {
cv_.notify_all();
} else {
+ cv_.wait(lockHeld, [&]() { return num_ >= count_; });