开发者

WaitForMultipleObjects and several SetEvent()'s

开发者 https://www.devze.com 2023-01-15 15:48 出处:网络
I process some event, signaled by WFMO, and at this time it\'s sign开发者_如何学JAVAaled more N times. Would WFMO return once or N times?Once. An event is basically like a Boolean variable; SetEvent i

I process some event, signaled by WFMO, and at this time it's sign开发者_如何学JAVAaled more N times. Would WFMO return once or N times?


Once. An event is basically like a Boolean variable; SetEvent is pretty much the same as event = true; -- setting it to true if it's already true has no effect.

If you want something that keeps count, consider using a semaphore instead of an event.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号