Skip to content

Commit

Permalink
replace flume with crossbeam-channel as it's already in the depen…
Browse files Browse the repository at this point in the history
…dency graph (#470)
  • Loading branch information
Byron committed Sep 20, 2022
1 parent e3e3211 commit e27b65a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 57 deletions.
55 changes: 1 addition & 54 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gitoxide-core/Cargo.toml
Expand Up @@ -18,7 +18,7 @@ default = []
## Discover all git repositories within a directory. Particularly useful with [skim](https://github.com/lotabout/skim).
organize = ["git-url", "jwalk"]
## Derive the amount of time invested into a git repository akin to [git-hours](https://github.com/kimmobrunfeldt/git-hours).
estimate-hours = ["itertools", "fs-err", "num_cpus", "flume"]
estimate-hours = ["itertools", "fs-err", "num_cpus", "crossbeam-channel"]

#! ### Mutually Exclusive Networking
#! If both are set, _blocking-client_ will take precedence, allowing `--all-features` to be used.
Expand Down Expand Up @@ -63,7 +63,7 @@ jwalk = { version = "0.6.0", optional = true }
itertools = { version = "0.10.1", optional = true }
fs-err = { version = "2.6.0", optional = true }
num_cpus = { version = "1.13.1", optional = true }
flume = { version = "0.10.14", optional = true }
crossbeam-channel = { version = "0.5.6", optional = true }

document-features = { version = "0.2.0", optional = true }

Expand Down
3 changes: 2 additions & 1 deletion gitoxide-core/src/hours.rs
Expand Up @@ -132,7 +132,8 @@ where
let (tx_tree_id, stat_threads) = needs_stats
.then(|| {
let num_threads = num_cpus::get().saturating_sub(1 /*main thread*/).max(1);
let (tx, rx) = flume::unbounded::<(u32, Option<git::hash::ObjectId>, git::hash::ObjectId)>();
let (tx, rx) =
crossbeam_channel::unbounded::<(u32, Option<git::hash::ObjectId>, git::hash::ObjectId)>();
let stat_workers = (0..num_threads)
.map(|_| {
scope.spawn({
Expand Down

0 comments on commit e27b65a

Please sign in to comment.