while loop is little more solid than do..while
This commit is contained in:
parent
87918c657c
commit
cc4dc25f4a
1 changed files with 2 additions and 2 deletions
|
|
@ -250,9 +250,9 @@ lumiera_thread_sync (int state)
|
|||
|
||||
TODO("error handing, maybe timed mutex (using the threads heartbeat timeout, shortly before timeout)");
|
||||
|
||||
do {
|
||||
while (self->state != state) {
|
||||
lumiera_condition_wait (&self->signal, &NOBUG_FLAG(threads), self->rh);
|
||||
} while (self->state != state);
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue