Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dagou committed Aug 19, 2024
1 parent 27095d8 commit f109e8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 7 additions & 4 deletions kr2r/src/bin/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,17 @@ fn process_batch<P: AsRef<Path>>(
);
Some(output_line)
} else {
eprintln!("can't find {} in sample_id map file", k);
None
}
},
|result| {
while let Some(Some(res)) = result.next() {
writer
.write_all(res.as_bytes())
.expect("write output content error");
while let Some(output) = result.next() {
if let Some(res) = output {
writer
.write_all(res.as_bytes())
.expect("write output content error");
}
}
},
)
Expand Down
3 changes: 2 additions & 1 deletion seqkmer/src/parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use scoped_threadpool::Pool;
use std::collections::HashMap;
use std::io::Result;
use std::sync::Arc;

pub struct ParallelResult<P>
where
P: Send,
Expand Down Expand Up @@ -164,7 +165,7 @@ where
let _ = func(&mut parallel_result);
});

// pool_scope.join_all();
pool_scope.join_all();
});

Ok(())
Expand Down

0 comments on commit f109e8d

Please sign in to comment.