I need to synchronize multiple threads (using POSIX threads). Moreover, I am making use of condition variables (monitors) to achieve that.
The issue is that I must implement a "first come first served" strategy. Say multiple threads are waiting for another thread to signal that condition change, does the pthread_cond_wait
call put the threads in a queue itself or should I define an explicit queue to achieve this? A possible solution to this might also be making use of locks.