mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-09 09:19:09 +02:00
fixed first wait in softsynth thread
The thread should wait if there is nothing in the queue and if there is not a request to stop. Thanks to Chris Brannon for the patch.
This commit is contained in:
parent
3687f16b09
commit
6a15f2cccf
1 changed files with 3 additions and 1 deletions
4
synth.c
4
synth.c
|
|
@ -257,7 +257,9 @@ void *espeak_thread(void *arg)
|
|||
|
||||
pthread_mutex_lock(&queue_guard);
|
||||
while (should_run) {
|
||||
pthread_cond_wait(&runner_awake, &queue_guard);
|
||||
|
||||
while (should_run && !queue_peek() && !runner_must_stop)
|
||||
pthread_cond_wait(&runner_awake, &queue_guard);
|
||||
|
||||
while (should_run && queue_peek() && !runner_must_stop) {
|
||||
queue_process_entry(s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue