diff --git a/Cargo.toml b/Cargo.toml index ba661a07770..9cd2227fe46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,7 @@ atty = "0.2" bytesize = "1.0" cargo-platform = { path = "crates/cargo-platform", version = "0.1.1" } crates-io = { path = "crates/crates-io", version = "0.31" } +crossbeam-channel = "0.4" crossbeam-utils = "0.7" crypto-hash = "0.3.1" curl = { version = "0.4.23", features = ["http2"] } diff --git a/src/cargo/core/compiler/job_queue.rs b/src/cargo/core/compiler/job_queue.rs index 55832cb906a..55954911718 100644 --- a/src/cargo/core/compiler/job_queue.rs +++ b/src/cargo/core/compiler/job_queue.rs @@ -54,11 +54,11 @@ use std::collections::{BTreeMap, HashMap, HashSet}; use std::io; use std::marker; use std::mem; -use std::sync::mpsc::{channel, Receiver, Sender}; use std::sync::Arc; use std::time::Duration; use anyhow::format_err; +use crossbeam_channel::{unbounded, Receiver, Sender}; use crossbeam_utils::thread::Scope; use jobserver::{Acquired, Client, HelperThread}; use log::{debug, info, trace}; @@ -341,7 +341,7 @@ impl<'a, 'cfg> JobQueue<'a, 'cfg> { let _p = profile::start("executing the job graph"); self.queue.queue_finished(); - let (tx, rx) = channel(); + let (tx, rx) = unbounded(); let progress = Progress::with_style("Building", ProgressStyle::Ratio, cx.bcx.config); let state = DrainState { total_units: self.queue.len(),