algbio / ggcat

Compacted and colored de Bruijn graph construction and querying
MIT License
73 stars 10 forks source link

Fix AsyncSliceQueue #22

Closed jnalanko closed 1 year ago

jnalanko commented 1 year ago

The for-loop in AsyncSliceQueue::new pushes only max_slices_buffers_count-1 vectors to the chunks buffers pool. This is a problem at least when max_slices_buffers_count is 1, which is the case when the number of threads is 1, in which case nothing is pushed. The function add_data will then get stuck in the inner loop, because self.chunks_buffers_pool.1.try_recv() always fails because there is nothing in the pool.