aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread/WindowsCond.hxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/thread/WindowsCond.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/thread/WindowsCond.hxx b/src/thread/WindowsCond.hxx
index f4e909c72..c05bc05b2 100644
--- a/src/thread/WindowsCond.hxx
+++ b/src/thread/WindowsCond.hxx
@@ -54,9 +54,13 @@ public:
WakeAllConditionVariable(&cond);
}
+ bool timed_wait(CriticalSection &mutex, DWORD timeout_ms) {
+ return SleepConditionVariableCS(&cond, &mutex.critical_section,
+ timeout_ms);
+ }
+
void wait(CriticalSection &mutex) {
- SleepConditionVariableCS(&cond, &mutex.critical_section,
- INFINITE);
+ timed_wait(mutex, INFINITE);
}
};