Condition variable's wait_for and wait_until method does not unlock the mutex when the thread is blocking

27 weergaven
Naar het eerste ongelezen bericht

张华

ongelezen,
20 nov 2015, 01:34:4920-11-2015
aan Native-Client-Discuss
I'm building with clang-newlib. When I tried to use condition variable's wait_until and wait_for method, I noticed that both of them don't unlock the mutex when the thread is blocked. As a result, other threads waiting for the lock can't proceed. Anyone else has met similar issue?

Ben Smith

ongelezen,
11 dec 2015, 14:33:4211-12-2015
aan Native-Client-Discuss
What condition variable class are you using? AFAIK, NaCl just provides pthread condition variables, which don't have that API. You can see it unlock the mutex here, in the source: https://chromium.googlesource.com/native_client/src/native_client/+/master/src/untrusted/pthread/nc_condvar.c#90
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten