Windows programming: Event states
Just some basics about the Windows Event object. Event objects can be used for inter process synchronization. They have only 2 states: signalled and non-signalled. When the Event object is in the non signalled state, it means that it is being used by a thread. All other threads which want to use it will have to go to sleep while this state is maintained. When the current thread which owns the object releases it, the object goes into the signalled state and wakes up a thread which was waiting for it. SetEvent() sets the state of the object to the signalled state while ResetEvent() sets it to the non-signalled state.When creating an event object, we can specify which state it is created in.