mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
[enqueue_to_workers] only increment wq->writeto when we write #2627
This commit is contained in:
parent
a35d42b0e4
commit
7db7b0150a
@ -142,11 +142,11 @@ enqueue_to_workers(sixel_engine* eng, qstate* qs){
|
|||||||
wq->qstates[wq->writeto] = qs;
|
wq->qstates[wq->writeto] = qs;
|
||||||
++wq->used;
|
++wq->used;
|
||||||
++usecount;
|
++usecount;
|
||||||
}
|
|
||||||
if(++wq->writeto == WORKERDEPTH){
|
if(++wq->writeto == WORKERDEPTH){
|
||||||
wq->writeto = 0;
|
wq->writeto = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
qs->refcount = usecount;
|
qs->refcount = usecount;
|
||||||
pthread_mutex_unlock(&eng->lock);
|
pthread_mutex_unlock(&eng->lock);
|
||||||
if(usecount){
|
if(usecount){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user