|
|
@@ -111,7 +111,7 @@ bool JackMessageBuffer::Execute() |
|
|
|
/* and we're done */ |
|
|
|
fGuard.Signal(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* releasing the mutex reduces contention */ |
|
|
|
fGuard.Unlock(); |
|
|
|
Flush(); |
|
|
@@ -177,17 +177,17 @@ int JackMessageBuffer::SetInitCallback(JackThreadInitCallback callback, void *ar |
|
|
|
fGuard.Signal() |
|
|
|
// wait for it to be done |
|
|
|
fGuard.Wait(); |
|
|
|
// and we're done |
|
|
|
fGuard.Unlock(); |
|
|
|
*/ |
|
|
|
|
|
|
|
fGuard.Unlock(); |
|
|
|
int count = 0; |
|
|
|
while (fInit && ++count < 1000) { |
|
|
|
/* wake msg buffer thread */ |
|
|
|
fGuard.Signal(); |
|
|
|
JackSleep(1000); |
|
|
|
} |
|
|
|
|
|
|
|
/* and we're done */ |
|
|
|
fGuard.Unlock(); |
|
|
|
if (count == 1000) goto error; |
|
|
|
return 0; |
|
|
|
} |
|
|
|