Browse Source

Some documentation in JackMessageBuffer::SetInitCallback.

tags/1.9.9.5
Stephane Letz 13 years ago
parent
commit
c044ac8da1
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      common/JackMessageBuffer.cpp

+ 8
- 2
common/JackMessageBuffer.cpp View File

@@ -169,14 +169,20 @@ int JackMessageBuffer::SetInitCallback(JackThreadInitCallback callback, void *ar
fInitArg = arg;
fInit = callback;
/*
The condition variable emulation code does not work reliably on Windows (lost signal).
So use a "hachish" way to signal/wait for the result.
Probaly better in the long term : use pthread-win32 (http://sourceware.org/pthreads-win32/)
fGuard.Wait();
*/

int count = 0;
while (fInit && ++count < 1000) {
/* wake msg buffer thread */
fGuard.Signal();
JackSleep(1000);
}
//fGuard.Wait();
/* and we're done */
fGuard.Unlock();
if (count == 1000) goto error;


Loading…
Cancel
Save