[enqueue_to_workers] only increment wq->writeto when we write #2627

This commit is contained in:
nick black 2022-02-17 09:49:37 -05:00
parent a35d42b0e4
commit 7db7b0150a
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -142,11 +142,11 @@ enqueue_to_workers(sixel_engine* eng, qstate* qs){
wq->qstates[wq->writeto] = qs;
++wq->used;
++usecount;
}
if(++wq->writeto == WORKERDEPTH){
wq->writeto = 0;
}
}
}
qs->refcount = usecount;
pthread_mutex_unlock(&eng->lock);
if(usecount){