Is it possible to enter an alertable wait state using MsgWaitForMultipleObjects()
/ MsgWaitForMultipleObjectsEx()
?
views:
292answers:
2
A:
MsgWaitForMultipleObjectsEx
puts the thread in an alertable wait state.
From MSDN on SleepEx:
A thread goes into an alertable wait state by calling either SleepEx, MsgWaitForMultipleObjectsEx, WaitForSingleObjectEx, or WaitForMultipleObjectsEx, with the function's bAlertable parameter set to TRUE.
Richard
2009-04-22 09:28:15
Yeah, but MsgWaitForMultipleObjectsEx doesn't have a bAlertable parameter. Does it just go into alertable state by default?
2009-04-22 09:35:57
@Ee Zz: To expand on that, the only difference (as far as I am aware) between MsgWaitForMultipleObjectsEx and MsgWaitForMultipleObjects is the former is alterable, thus no separate parameter or flag is needed.
Richard
2009-04-22 15:35:07
+2
A:
it is possible to enter into an alertable wait if you specify MWMO_ALERTABLE flag as the last parameter (dwFlags - the wait type)
Andrey
2009-05-14 01:16:54