automatically unlock mutex, because wait is a cancel point
This commit is contained in:
parent
db89cf202a
commit
1f6e343a7b
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ public:
|
||||||
void wake_up() { _jobs.signal(); }
|
void wake_up() { _jobs.signal(); }
|
||||||
|
|
||||||
private:
|
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;
|
SGPthreadCond _jobs;
|
||||||
SGMutex _mutex;
|
SGMutex _mutex;
|
||||||
FGVoiceMgr *_mgr;
|
FGVoiceMgr *_mgr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue