Stream synchronization using variable conditions (monitors)

I need to synchronize multiple threads (using POSIX threads). Moreover, I use state variables (monitors) to achieve this.

The problem is that I have to implement a first come first strategy. Let's say that several threads are waiting for another thread to signal a change in the condition, does the call invoke the pthread_cond_waitthreads in the queue or do I need to define an explicit queue to achieve this? A possible solution to this would be to use locks.

+4
source share
1 answer

API Pthreads pthread_cond_wait + pthread_cond_signal/pthread_cond_broadcast. spec , , :

, .

( "" , Linux CFS) .

, MCS.

0

All Articles