Skip to content

Commit 4fbd644

Browse files
committed
Auto merge of #7844 - spastorino:fix-infinite-loop, r=alexcrichton
Swap std::sync::mpsc channel with crossbeam_channel Hoping it closes #7840 r? @Mark-Simulacrum
2 parents a07c26f + 20ddff8 commit 4fbd644

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ atty = "0.2"
2323
bytesize = "1.0"
2424
cargo-platform = { path = "crates/cargo-platform", version = "0.1.1" }
2525
crates-io = { path = "crates/crates-io", version = "0.31" }
26+
crossbeam-channel = "0.4"
2627
crossbeam-utils = "0.7"
2728
crypto-hash = "0.3.1"
2829
curl = { version = "0.4.23", features = ["http2"] }

src/cargo/core/compiler/job_queue.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ use std::collections::{BTreeMap, HashMap, HashSet};
5454
use std::io;
5555
use std::marker;
5656
use std::mem;
57-
use std::sync::mpsc::{channel, Receiver, Sender};
5857
use std::sync::Arc;
5958
use std::time::Duration;
6059

6160
use anyhow::format_err;
61+
use crossbeam_channel::{unbounded, Receiver, Sender};
6262
use crossbeam_utils::thread::Scope;
6363
use jobserver::{Acquired, Client, HelperThread};
6464
use log::{debug, info, trace};
@@ -341,7 +341,7 @@ impl<'a, 'cfg> JobQueue<'a, 'cfg> {
341341
let _p = profile::start("executing the job graph");
342342
self.queue.queue_finished();
343343

344-
let (tx, rx) = channel();
344+
let (tx, rx) = unbounded();
345345
let progress = Progress::with_style("Building", ProgressStyle::Ratio, cx.bcx.config);
346346
let state = DrainState {
347347
total_units: self.queue.len(),

0 commit comments

Comments
 (0)