@@ -5,12 +5,13 @@ use std::fmt::Debug;
5
5
use std:: io:: Seek ;
6
6
use std:: iter:: Peekable ;
7
7
use std:: ops:: Not ;
8
+ use std:: sync:: mpsc;
8
9
use rayon_core:: { ThreadPool , ThreadPoolBuildError } ;
9
10
10
11
use smallvec:: alloc:: collections:: BTreeMap ;
11
12
12
13
use crate :: block:: UncompressedBlock ;
13
- use crate :: block:: chunk:: { Chunk } ;
14
+ use crate :: block:: chunk:: Chunk ;
14
15
use crate :: compression:: Compression ;
15
16
use crate :: error:: { Error , Result , UnitResult , usize_to_u64} ;
16
17
use crate :: io:: { Data , Tracking , Write } ;
@@ -337,8 +338,8 @@ pub struct ParallelBlocksCompressor<'w, W> {
337
338
meta : & ' w MetaData ,
338
339
sorted_writer : SortedBlocksWriter < ' w , W > ,
339
340
340
- sender : flume :: Sender < Result < ( usize , usize , Chunk ) > > ,
341
- receiver : flume :: Receiver < Result < ( usize , usize , Chunk ) > > ,
341
+ sender : mpsc :: Sender < Result < ( usize , usize , Chunk ) > > ,
342
+ receiver : mpsc :: Receiver < Result < ( usize , usize , Chunk ) > > ,
342
343
pool : rayon_core:: ThreadPool ,
343
344
344
345
currently_compressing_count : usize ,
@@ -379,7 +380,7 @@ impl<'w, W> ParallelBlocksCompressor<'w, W> where W: 'w + ChunksWriter {
379
380
} ;
380
381
381
382
let max_threads = pool. current_num_threads ( ) . max ( 1 ) . min ( chunks_writer. total_chunks_count ( ) ) + 2 ; // ca one block for each thread at all times
382
- let ( send, recv) = flume :: unbounded ( ) ; // TODO bounded channel simplifies logic?
383
+ let ( send, recv) = mpsc :: channel ( ) ; // TODO bounded channel simplifies logic?
383
384
384
385
Some ( Self {
385
386
sorted_writer : SortedBlocksWriter :: new ( meta, chunks_writer) ,
0 commit comments