dubious pthread cond var usage in pa_jack.c
RossBencina opened this issue · 0 comments
RossBencina commented
As noted in a comment on #820 pa_jack.c
is not using posix condition variables correctly:
WaitCondition()
and its callers are not running a loop to deal with spurious wakeups (which are a thing for pthread cond vars)WaitCondition()
and its callers are not using cond vars correctly: there should be a variable (or variables) associated with the cond var that are used to signal/check the desired condition. by itself a cond var is just a wakeup mechanism, unlike a semaphore or a Windows Event object a cond var doesn't encode any information about whether the condition has been met, infact it can wake up spuriously and signal no error.