The MSDN page for SleepConditionVariableCS indicates that
Variable conditions are subject to false awakenings (not associated with a clear trace) and stolen awakenings (another thread manages to run up to the swollen thread). Therefore, you should double-check the predicate (usually in a while loop) after the sleep operation returns.
As a result, the conditional wait should be enclosed in a while loop, i.e.
while (check_predicate()) { SleepConditionVariableCS(...) }
If I used events instead of condition variables, can I end the while loop while waiting ( WaitForSingleObject ) to report the event?
WaitForSingleObject() , .
WaitForSingleObject()
WaitForMultipleObjectsEx() bAlertable=TRUE, MsgWaitForMultipleObjects() MsgWaitForMultipleObjectsEx() bAlertable=TRUE , , .
WaitForMultipleObjectsEx()
bAlertable=TRUE
MsgWaitForMultipleObjects()
MsgWaitForMultipleObjectsEx()
Source: https://habr.com/ru/post/1650105/More articles:mail: Invalid header when sending email application using Ubuntu - command-lineHow can I fill in arbitrary sets? - setexpress: how to send html along with css using sendFile? - htmlRuby rubocop: how to freeze an array constant generated by splat - ruby | fooobar.comМне нужна обратная связь по этому частично безсерверному дизайну архитектуры - amazon-s3Make a dynamic chess panel responsive to jQuery user input - jqueryWhy include multiple headers for a single POSIX function? - cРазница в компиляторах: расширение x3:: variant требует определенного экземпляра copy constrctor, оператора присваивания копий и конструктора по умолчанию с gcc, но не clang - c++Android error in textbook cannot find symbol variable activity_display_message - javaI get a lot of these errors: Copy error :. If this helps, I create an application with more than 200 activities - androidAll Articles