We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7653b6b + b1be086 commit fecba2eCopy full SHA for fecba2e
lib/Threading/Pthreads.cpp
@@ -71,7 +71,7 @@ void swift::threading_impl::once_slow(once_t &predicate, void (*fn)(void *),
71
72
pthread_mutex_lock(&onceMutex);
73
while (predicate.load(std::memory_order_acquire) >= (std::int64_t)0) {
74
- pthread_cond_wait(&onceCond);
+ pthread_cond_wait(&onceCond, &onceMutex);
75
}
76
pthread_mutex_unlock(&onceMutex);
77
0 commit comments