Subj : Re: waitformultipleobjects() on several semaphores ? To : comp.programming.threads From : Joseph Seigh Date : Fri Feb 04 2005 02:41 pm On Fri, 4 Feb 2005 19:34:37 +0100, mandatory wrote: > I have this array "semaphores" which contains 4 valid handles for 4 > sempahores: > > HANDLE semaphores[4]; > > > In ThreadA i have a wait: > > dwStatus = WaitForMultipleObjects (4, semaphores, FALSE, INFINITE); > > If one semaphore is signalled, then it is ok - i get the dwStatus value of > the semphore which was signalled. > > The problem i think im experiencing, is what if 2 semaphores are signalled > at the same time ? > You're only going to see one semaphore signaled at a time. To see the signal from the other semaphore, you'll have to reinvoke WaitForMultipleObjects. -- Joe Seigh .