Ee Zz
Ee Zz

Reputation:

MsgWaitForMultipleObjectsEx and alertable wait state

Is it possible to enter an alertable wait state using MsgWaitForMultipleObjects() / MsgWaitForMultipleObjectsEx()?

Upvotes: 0

Views: 1547

Answers (2)

Andrey
Andrey

Reputation: 4356

it is possible to enter into an alertable wait if you specify MWMO_ALERTABLE flag as the last parameter (dwFlags - the wait type)

Upvotes: 2

Richard
Richard

Reputation: 108995

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.

Upvotes: 0

Related Questions