Remove the use of Rayon iterators
This commit is contained in:
parent
69b3959afe
commit
02f10d9bfe
14 changed files with 122 additions and 74 deletions
|
@ -5,7 +5,6 @@ edition = "2024"
|
|||
|
||||
[dependencies]
|
||||
# tidy-alphabetical-start
|
||||
rustc-rayon = { version = "0.5.0" }
|
||||
rustc-rayon-core = { version = "0.5.0" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_ast_lowering = { path = "../rustc_ast_lowering" }
|
||||
|
|
|
@ -179,7 +179,7 @@ pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce(CurrentGcx) -> R + Send,
|
|||
let current_gcx = FromDyn::from(CurrentGcx::new());
|
||||
let current_gcx2 = current_gcx.clone();
|
||||
|
||||
let builder = rayon::ThreadPoolBuilder::new()
|
||||
let builder = rayon_core::ThreadPoolBuilder::new()
|
||||
.thread_name(|_| "rustc".to_string())
|
||||
.acquire_thread_handler(jobserver::acquire_thread)
|
||||
.release_thread_handler(jobserver::release_thread)
|
||||
|
@ -236,7 +236,7 @@ pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce(CurrentGcx) -> R + Send,
|
|||
builder
|
||||
.build_scoped(
|
||||
// Initialize each new worker thread when created.
|
||||
move |thread: rayon::ThreadBuilder| {
|
||||
move |thread: rayon_core::ThreadBuilder| {
|
||||
// Register the thread for use with the `WorkerLocal` type.
|
||||
registry.register();
|
||||
|
||||
|
@ -245,7 +245,9 @@ pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce(CurrentGcx) -> R + Send,
|
|||
})
|
||||
},
|
||||
// Run `f` on the first thread in the thread pool.
|
||||
move |pool: &rayon::ThreadPool| pool.install(|| f(current_gcx.into_inner())),
|
||||
move |pool: &rayon_core::ThreadPool| {
|
||||
pool.install(|| f(current_gcx.into_inner()))
|
||||
},
|
||||
)
|
||||
.unwrap()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue