Re: Waiting for event

Tech-Archive recommends: Speed Up your PC by fixing your registry



The clients perform a clean-up task that may take several seconds. The
clients are using WaitForMultipleObject on the event (they are also waiting
for other things).

I've read and re-read the MSDN docs and it seem to imply that:

1. Auto-resetting = Will ONLY release one waiting thread (this is
intentional)

2. Manual resetting = Will release all waiting threads, but this isn't made
explicitly clear.

What would be the best technique to ensure no waiting thread misses the
event?

James

"Alexander Grigoriev" <alegr@xxxxxxxxxxxxx> wrote in message
news:en7DsUKOJHA.4760@xxxxxxxxxxxxxxxxxxxxxxx
It depend on what the client do when the event is signalled.

"Jim Clark" <nospam-jameswclark@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:49061ed3$1_3@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I've got a situation where multiple client processes are waiting for an
event that is signalled by a server process. The event is created by the
server process which then launches the clients. The clients then wait on
the event. The event can be signalled multiple times.

I originally wanted to make the event auto-resetting, but when I read up
on it in MSDN it said that auto-resetting events are reset as soon as the
first waiting thread is signalled.

What is the correct way to handle this situation please? I know I cannot
use a self-resetting event, but what should I do after signalling the
event to ensure that all the clients have synchronized on it - will ALL
clients always synchronize even if the event is rapidly reset?

James





.



Relevant Pages

  • Waiting for event
    ... server process which then launches the clients. ... waiting thread is signalled. ... but what should I do after signalling the event to ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Waiting for event
    ... You don't have to use the same event for all clients. ... What would be the best technique to ensure no waiting thread misses the ... I originally wanted to make the event auto-resetting, ... but what should I do after signalling the ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Problem with socket programming
    ... I want to get how many clients are waiting for being accepted in the ... about Linux specifically, then you should ask in a Linux ... Unix-related questions. ...
    (comp.lang.c)
  • Re: Advertisement Status Issue
    ... I assume you mean 'Waiting for User Environment' ... Clients seem to be requesting the right version. ...
    (microsoft.public.sms.swdist)
  • Re: Server 2008 failover cluster...force change of IP on failover
    ... that leave you waiting on a dns update after a failover before clients could ... Clients need to get the new IP and start using it, which requires low TTLs on the host records. ... Messaging and Security, MCT, MCITP, MCTS and other stuff ...
    (microsoft.public.windows.server.clustering)