DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit a94a9948fce36771a2e9d2cc166033d09a12fe80
parent 793c9f658c7433666110ff25273b32138a58b6c0
Author: falkTX <falktx@gmail.com>
Date:   Tue, 29 Mar 2016 19:32:27 +0200

Final fix

Diffstat:
Mdistrho/extra/Thread.hpp | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/distrho/extra/Thread.hpp b/distrho/extra/Thread.hpp @@ -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; }