Wait condition_variable_any for steady_clock by AlexGuteniev · Pull Request #4755 · microsoft/STL (original) (raw)

Fixes #4723

Turned out that:

The fix is to check exactly steady_clock in condition_variable_any.

This is done in a header, rather than in .cpp for these reasons:

That's why GetTickCount64() was removed from internal wait function.

To avoid destabilizing behavior for already compiled code, I kept GetTickCount64() on that code path (it might improve over raw SleepConditionVariableSRW a bit).

I've inlined _Wait_for_ms_count as to me it appeared clearer this way after these changes.