How I can wait more then one condition variable in one place?
Condition variables are merely devices to delay the execution of a thread. You don’t need more than one of these in order to accomplish that task. Threads that use condition variables actually wait for a predicate to become true; the evaluation of that predicate is done explicitly in the code, while holding a mutex, e.g. lock mutex … while not predicate() wait (condition, mutex ) … unlock mutex You can easily wait on an array of predicates, provided that they are protected by the same mutex. Simply loop over all of them, and if they are all false, wait on the condition. If some of them are true, the perform the associated servicing. >I need pthread analog for WaitForMultipleObjects (WIN32) or >DosWaitMuxWaitSem (OS2) You should not need this, unless you (or someone else) made the design mistake of allowing operating system synchronization objects to be used as an interface mechanism between program components. If two unrelated objects, say A and B, are both to generate independent