8 May
2003
8 May
'03
8:16 p.m.
Is there any way to wait for one of several condition objects to become ready? Is there some reason that this capability is omitted from the thread library? I would like to do something like this: mutex monitorA, monitorB; condition conditionA, conditionB; double_condition conditionAB(conditionA,conditionB); void executeNextEvent() { lock lkA(monitorA); lock lkB(monitorB); //Wait for either conditionA or conditionB to become ready. conditionAB.wait(lkA,predicateA,lkB,predicateB); if(predicateA()) { executeEventA(); } else { executeEventB(); } } [Non-text portions of this message have been removed]