lock the mutex on pthread_cond_signal()

This commit is contained in:
kprotty 2019-11-07 09:23:02 -06:00
parent 7045f1e875
commit 92dac89d01

View File

@ -199,6 +199,8 @@ const PosixParker = struct {
}
pub fn unpark(self: *PosixParker, ptr: *const u32) void {
assert(pthread_mutex_lock(&self.mutex) == 0);
defer assert(pthread_mutex_unlock(&self.mutex) == 0);
assert(pthread_cond_signal(&self.cond) == 0);
}