diff --git a/common/JackMessageBuffer.cpp b/common/JackMessageBuffer.cpp index 17bd6fa4..990d1288 100644 --- a/common/JackMessageBuffer.cpp +++ b/common/JackMessageBuffer.cpp @@ -171,8 +171,11 @@ int JackMessageBuffer::SetInitCallback(JackThreadInitCallback callback, void *ar /* The condition variable emulation code does not work reliably on Windows (lost signal). - So use a "hachish" way to signal/wait for the result. + So use a "hackish" way to signal/wait for the result. Probaly better in the long term : use pthread-win32 (http://sourceware.org/pthreads-win32/) + // wake msg buffer thread + fGuard.Signal() + // wait for it to be done fGuard.Wait(); */ diff --git a/common/JackMessageBuffer.h b/common/JackMessageBuffer.h index db57e220..fc0d7177 100644 --- a/common/JackMessageBuffer.h +++ b/common/JackMessageBuffer.h @@ -57,7 +57,7 @@ class JackMessageBuffer : public JackRunnableInterface private: - JackThreadInitCallback fInit; + volatile JackThreadInitCallback fInit; void* fInitArg; JackMessage fBuffers[MB_BUFFERS]; JackThread fThread;