fix: condition for signalling thread termination is optional
This commit is contained in:
parent
e0ff915987
commit
b6d22bb2e0
2 changed files with 4 additions and 1 deletions
|
|
@ -59,6 +59,9 @@ static void* pthread_runner (void* thread)
|
|||
|
||||
starter->fn (starter->arg);
|
||||
|
||||
if (!starter->finished)
|
||||
return NULL; // no condition var provided for signalling thread termination
|
||||
|
||||
LUMIERA_RECCONDITION_SECTION(cond_sync, starter->finished)
|
||||
LUMIERA_RECCONDITION_BROADCAST;
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
/**
|
||||
* Wait for a condition.
|
||||
* Must be used inside a RECCONDITION_SECTION.
|
||||
* @param expr Conditon which must become true, else the condition variable goes back into sleep
|
||||
* @param expr Condition which must become true, else the condition variable goes back into sleep
|
||||
*/
|
||||
#define LUMIERA_RECCONDITION_WAIT(expr) \
|
||||
do { \
|
||||
|
|
|
|||
Loading…
Reference in a new issue