The problem is that the WaitForMultipleObjects(Ex) returns just smallest index of all the signalled objects in an array. I would like to know what exactly event objects (created using CreateEvent) are in signalled (or non-signalled) state. I think it is not possible but decided to ask just to make sure I'm not missing anything =)
For each object whose state you want to test, call WaitForSingleObject
with a timeout of zero. If it returns WAIT_OBJECT_0
, then the object is signaled. Otherwise, it's not.
Unless you have an auto-reset event, waiting for an object to become signaled does not alter its state.
Keep in mind that the state you detect with WaitForSingleObject
isn't necessarily the same state the object had when WaitForMultipleObjects
returned. More objects might have become signaled in the meantime, and other objects might have become non-signaled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With