Re: Two WaitForSingleObject functions wait the same event
- From: "Danny" <danny@xxxxxxxxxx>
- Date: Mon, 8 Dec 2008 09:30:22 -0500
Hello,
It depends if it is a manual reset event or an auto reset event. If it is
auto-reset, then only one thread is signalled. If it is a manual reset
event, then any/all threads waiting will be signalled until the event is
reset. See MSDN http://msdn.microsoft.com/en-us/library/aa909161.aspx for
details of how SetEvent works. Note there are ways to signal more than one
thread using PulseEvent and manul reset events, but there are issues with
that too. Your better off having separate events.
Cheers
Danny
"C.L" <CL@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:743C914E-78C1-48DA-A6BF-862E705B02A8@xxxxxxxxxxxxxxxx
Hi,
I have two threads using WaitForSingleObject function to wait the same
event. When the event is set, are both these two thread triggered?
Thanks.
.
- Follow-Ups:
- References:
- Prev by Date: Re: Platform Builder 5.0 and Windows Vista: Question on Kernel Deb
- Next by Date: Re: Relocate from nor to ddr CE 5.0
- Previous by thread: Re: Two WaitForSingleObject functions wait the same event
- Next by thread: Re: Two WaitForSingleObject functions wait the same event
- Index(es):