about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/sync.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-30 23:57:22 +0000
committerbors <bors@rust-lang.org>2025-04-30 23:57:22 +0000
commit0c33fe2c3d3eecadd17a84b110bb067288a64f1c (patch)
tree902822b48623953361aa74bf42e6ea71d623f1e7 /compiler/rustc_data_structures/src/sync.rs
parentb45dd71d1824f176fba88f6c40467030a16afa2c (diff)
parentef9403371f2d4759cd7b0d0a276e63aae2ce68fe (diff)
downloadrust-0c33fe2c3d3eecadd17a84b110bb067288a64f1c.tar.gz
rust-0c33fe2c3d3eecadd17a84b110bb067288a64f1c.zip
Auto merge of #121909 - Zoxc:drop-ast-task, r=petrochenkov
Drop AST on a separate thread and prefetch `hir_crate`

This drop AST on a separate thread and prefetches `hir_crate`.

A `spawn` function is added to the `parallel` module which spawn some work on the Rayon thread pool.
Diffstat (limited to 'compiler/rustc_data_structures/src/sync.rs')
-rw-r--r--compiler/rustc_data_structures/src/sync.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/sync.rs b/compiler/rustc_data_structures/src/sync.rs
index 616a18a72ab..80d49effbf8 100644
--- a/compiler/rustc_data_structures/src/sync.rs
+++ b/compiler/rustc_data_structures/src/sync.rs
@@ -43,7 +43,7 @@ pub use self::freeze::{FreezeLock, FreezeReadGuard, FreezeWriteGuard};
 pub use self::lock::{Lock, LockGuard, Mode};
 pub use self::mode::{is_dyn_thread_safe, set_dyn_thread_safe_mode};
 pub use self::parallel::{
-    join, par_for_each_in, par_map, parallel_guard, scope, try_par_for_each_in,
+    join, par_for_each_in, par_map, parallel_guard, scope, spawn, try_par_for_each_in,
 };
 pub use self::vec::{AppendOnlyIndexVec, AppendOnlyVec};
 pub use self::worker_local::{Registry, WorkerLocal};