Switch to crossbeam_utils crate, sidesteppin

This commit is contained in:
Dale Wijnand 2018-07-25 23:32:25 +01:00
parent ac2d5d0917
commit 8ea90e96cf
No known key found for this signature in database
GPG key ID: 4F256E3D151DF5EF
3 changed files with 5 additions and 6 deletions

View file

@ -19,7 +19,7 @@ path = "src/cargo/lib.rs"
[dependencies]
atty = "0.2"
crates-io = { path = "src/crates-io", version = "0.18" }
crossbeam = "0.4"
crossbeam-utils = "0.4"
crypto-hash = "0.3.1"
curl = "0.4.13"
env_logger = "0.5.4"
@ -40,7 +40,6 @@ libc = "0.2"
log = "0.4"
libgit2-sys = "0.7.5"
num_cpus = "1.0"
parking_lot_core = "0.2.11" # required only for minimal-versions. brought in by crossbeam.
rustfix = "0.4"
same-file = "1"
semver = { version = "0.9.0", features = ["serde"] }

View file

@ -6,8 +6,8 @@ use std::mem;
use std::sync::mpsc::{channel, Receiver, Sender};
use std::sync::Arc;
use crossbeam;
use crossbeam::thread::Scope;
use crossbeam_utils;
use crossbeam_utils::scoped::Scope;
use jobserver::{Acquired, HelperThread};
use core::profiles::Profile;
@ -166,7 +166,7 @@ impl<'a> JobQueue<'a> {
srv.start(move |msg| drop(tx2.send(Message::FixDiagnostic(msg))))
});
crossbeam::scope(|scope| self.drain_the_queue(cx, plan, scope, &helper))
crossbeam_utils::scoped::scope(|scope| self.drain_the_queue(cx, plan, scope, &helper))
}
fn drain_the_queue(

View file

@ -15,7 +15,7 @@ extern crate clap;
#[cfg(target_os = "macos")]
extern crate core_foundation;
extern crate crates_io as registry;
extern crate crossbeam;
extern crate crossbeam_utils;
extern crate curl;
#[macro_use]
extern crate failure;