Browse Source

Final fix

pull/6/head
falkTX 8 years ago
parent
commit
a94a9948fc
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      distrho/extra/Thread.hpp

+ 2
- 3
distrho/extra/Thread.hpp View File

@@ -37,7 +37,7 @@ protected:
* Constructor.
*/
Thread(const char* const threadName = nullptr) noexcept
: fLock(false),
: fLock(),
fSignal(fLock),
fName(threadName),
#ifdef PTW32_DLLPORT
@@ -93,7 +93,7 @@ public:
// check if already running
DISTRHO_SAFE_ASSERT_RETURN(! isThreadRunning(), true);

fLock.lock();
const MutexLocker ml(fLock);

fShouldExit = false;

@@ -114,7 +114,6 @@ public:
return true;
}

fLock.unlock();
return false;
}



Loading…
Cancel
Save