SetEvent semantics (when nothing is waiting on the event)
- From: rturner@xxxxxxxxxx
- Date: Wed, 21 May 2008 00:28:07 -0700 (PDT)
I've got a program that runs on WinCE 6.0. It uses an (auto-reset)
event to signal a thread to start processing data. The loop for this
data processing thread looks like:
while (!fExit)
{
WaitForSingleObject(hEvent);
DoSomeProcessing();
}
If I call SetEvent(hEvent) while the thread is busy inside
DoSomeProcessing(), my expectation is that SetEvent() would just set
hEvent to signalled, and then return. However, it appears that in
this case SetEvent() doesn't return until until it can actually set
one thread running, so it waits for the call to
WaitForSingleObject(hEvent) to be hit before it returns.
Can someone confirm this is how SetEvent on WinCE 6.0 works? Or
doesn't? This seems different that how SetEvent works on XP / Vista.
.
- Follow-Ups:
- Re: SetEvent semantics (when nothing is waiting on the event)
- From: Michel Verhagen (eMVP)
- Re: SetEvent semantics (when nothing is waiting on the event)
- Prev by Date: Re: USBFN => data abort in Windows Embedded CE6.0
- Next by Date: Serial Interrupt
- Previous by thread: Intercepting incoming calls
- Next by thread: Re: SetEvent semantics (when nothing is waiting on the event)
- Index(es):