Project

General

Profile

Actions

Optimization #6569

closed

threading: fix condition signalling w/o taking lock first

Added by Victor Julien about 1 year ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

Description

"Unlocking the mutex and suspending on the condition variable is done atomically. Thus, if all threads always acquire the mutex before signaling the condition, this guarantees that the condition cannot be signaled (and thus ignored) between the time a thread locks the mutex and the time it waits on the condition variable." (from PTHREAD_COND(3))

Several places in our code don't do this.

Actions

Also available in: Atom PDF