Browse Source

Final fix

pull/6/head
falkTX 9 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. * Constructor.
*/ */
Thread(const char* const threadName = nullptr) noexcept Thread(const char* const threadName = nullptr) noexcept
: fLock(false),
: fLock(),
fSignal(fLock), fSignal(fLock),
fName(threadName), fName(threadName),
#ifdef PTW32_DLLPORT #ifdef PTW32_DLLPORT
@@ -93,7 +93,7 @@ public:
// check if already running // check if already running
DISTRHO_SAFE_ASSERT_RETURN(! isThreadRunning(), true); DISTRHO_SAFE_ASSERT_RETURN(! isThreadRunning(), true);


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


fShouldExit = false; fShouldExit = false;


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


fLock.unlock();
return false; return false;
} }




Loading…
Cancel
Save