Can a single SetEvent() trigger multiple WaitForSingleObject()

前端 未结 4 1976
一向
一向 2021-02-09 00:35

This:

http://msdn.microsoft.com/en-us/library/ms686915(VS.85).aspx

Would seem to suggest not.

I have three processes communicating via pipes. Process A C

4条回答
  •  一生所求
    2021-02-09 00:44

    You can use the Manual Reset Events and the PulseEvent function to release all of the threads currently waiting for the event.

    Note however, that this approach is inherently racy, as there is no way to tell which are "the threads currently waiting ...". You should use a more reliable synchronization mechanism if exact matching of the wakeup/2 wait events are needed.

提交回复
热议问题