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.
source
share