From 1f6e343a7bbe3af57f81cde3c4eabc50186530d3 Mon Sep 17 00:00:00 2001 From: mfranz Date: Sat, 18 Feb 2006 14:29:22 +0000 Subject: [PATCH] automatically unlock mutex, because wait is a cancel point --- src/Sound/voice.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sound/voice.hxx b/src/Sound/voice.hxx index eb4201dce..ae899476e 100644 --- a/src/Sound/voice.hxx +++ b/src/Sound/voice.hxx @@ -81,7 +81,7 @@ public: void wake_up() { _jobs.signal(); } private: - void wait_for_jobs() { _mutex.lock(); _jobs.wait(_mutex); _mutex.unlock(); } + void wait_for_jobs() { SGGuard g(_mutex); _jobs.wait(_mutex); } SGPthreadCond _jobs; SGMutex _mutex; FGVoiceMgr *_mgr; -- 2.39.5