Subj : Re: waitformultipleobjects() on several semaphores ? To : comp.programming.threads From : Joseph Seigh Date : Fri Feb 04 2005 06:20 pm On Fri, 4 Feb 2005 22:33:11 +0100, mandatory wrote: > "Joseph Seigh" skrev i en meddelelse > news:opslouangbbs6ffg@grunion... > >>> >> 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 > > Well, wouldnt you consider this to be a problem then ? > > Lets say that Semaphore[0] is signalled more or less all the time, then i > will only get the signal from the other semaphores when Semaphore[0] is > quiet - that is problematic. > Change the order of the list on every wait, or go through the list with a WaitForSingleObject with a timeout of zero and only do the WaitForMultipleObjects when all of the WaitForSingleObjects return WAIT_TIMEOUT. -- Joe Seigh .