1
0
Fork 0

automatically unlock mutex, because wait is a cancel point

This commit is contained in:
mfranz 2006-02-18 14:29:22 +00:00
parent db89cf202a
commit 1f6e343a7b

View file

@ -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<SGMutex> g(_mutex); _jobs.wait(_mutex); }
SGPthreadCond _jobs;
SGMutex _mutex;
FGVoiceMgr *_mgr;