Signal the playlist BEFORE unlocking it.
One should never signal a condition without the corresponding lock: "if predictable scheduling behavior is required, then that mutex shall be locked by the thread calling pthread_cond_broadcast() or pthread_cond_signal()." -- POSIX This only fixes the most obvious cases. There might be others.
Showing
Please register or sign in to comment