Fix race conditions and deadlocks in Channels (hopefully) (issue #554)

Also, this is a giant commit because of the official Code Style (tm) was applied.

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2013-01-30 17:15:12 +01:00
parent be2363fc00
commit c7c5d0ed6b
15 changed files with 414 additions and 367 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ bool Conditional::wait(thread::Mutex *_mutex, int timeout)
// Yes, I realise this can be dangerous,
// however, you're asking for it if you're
// mixing thread implementations.
Mutex *mutex = (Mutex*) _mutex;
Mutex *mutex = (Mutex *) _mutex;
if (timeout < 0)
return !SDL_CondWait(cond, mutex->mutex);
else