Does WaitForMultipleObjects() reset all auto-reset events?

后端 未结 1 1423
执笔经年
执笔经年 2021-01-18 10:42

I\'ve got an event loop that\'s waiting on several auto-reset events. The events were all initialized into array eventHandles_ with CreateEvent(NULL, fals

1条回答
  •  不思量自难忘°
    2021-01-18 11:18

    "...modification occurs only for the object or objects whose signaled state caused the function to return..."

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms687025(v=vs.85).aspx

    And from the mouth of one Raymond Chen:

    If waiting for one event, then only that event is modified. If waiting for all events, then all are modified. That's what the documentation means by "object or objects". Singular if wait-any, plural if wait-all.

    0 讨论(0)
提交回复
热议问题