WaitForSingleObject - do threads waiting form a queue?

后端 未结 5 528
庸人自扰
庸人自扰 2021-01-18 06:04

If I set 3 threads to wait for a mutex to be release, do they form a queue based on the order they requested it in or is it undefined behaviour (i.e. we don\'t know which on

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-18 06:41

    The wake-up order is undefined, see

    Can a single SetEvent() trigger multiple WaitForSingleObject()

提交回复
热议问题