mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-17 13:29:11 +02:00
moved lock/unlock in queue_process_entry
The only time queue_process_entry should lock the queue gard is when it is removing the item from the queue. This happens only when the item was successfully processed.
This commit is contained in:
parent
554a03d26c
commit
0bf2cae5a6
1 changed files with 4 additions and 3 deletions
7
synth.c
7
synth.c
|
|
@ -179,10 +179,11 @@ static void queue_process_entry(struct synth_t *s)
|
|||
break;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&queue_guard);
|
||||
if (error == EE_OK)
|
||||
if (error == EE_OK) {
|
||||
pthread_mutex_lock(&queue_guard);
|
||||
queue_remove();
|
||||
pthread_mutex_unlock(&queue_guard);
|
||||
pthread_mutex_unlock(&queue_guard);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue