refactor: replace mutex with channels for parallel debruijn processing

Add `rayon` and `crossbeam-channel` dependencies to support concurrent execution. Replace the synchronous, mutex-protected closure pattern with a channel-based producer-consumer approach using `std::thread::scope`. This decouples unitig iteration from processing, eliminating lock contention and `Mutex` overhead while enabling parallel workloads.
This commit is contained in:
Eric Coissac
2026-06-13 10:34:31 +02:00
parent 5f98d2ef96
commit 1f336fe496
3 changed files with 25 additions and 16 deletions
+2 -1
View File
@@ -8,7 +8,8 @@ obikseq = { path = "../obikseq" }
obifastwrite = { path = "../obifastwrite" }
ahash = "0.8"
hashbrown = { version = "0.14", features = ["rayon"] }
rayon = "1"
rayon = "1"
crossbeam-channel = "0.5"
xxhash-rust = { version = "0.8.15", features = ["xxh3", "const_xxh3"] }
tracing = "0.1"