about summary refs log tree commit diff
path: root/compiler/rustc_thread_pool/src/spawn
diff options
context:
space:
mode:
authorywxt <ywxtcwh@gmail.com>2025-06-25 19:38:40 +0800
committerywxt <ywxtcwh@gmail.com>2025-06-28 17:58:20 +0800
commit0ceac216c9ea96b4b63cba77ae1fabfc8e0320a1 (patch)
treef5fbd7d559d9c36276958d2a7673cf57991fc666 /compiler/rustc_thread_pool/src/spawn
parentd41e12f1f4e4884c356f319b881921aa37040de5 (diff)
Only work-steal in the main loop for rustc_thread_pool
Co-authored-by: Zoxc <zoxc32@gmail.com>
Diffstat (limited to 'compiler/rustc_thread_pool/src/spawn')
-rw-r--r--compiler/rustc_thread_pool/src/spawn/mod.rs2
-rw-r--r--compiler/rustc_thread_pool/src/spawn/tests.rs6
2 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_thread_pool/src/spawn/mod.rs b/compiler/rustc_thread_pool/src/spawn/mod.rs
index 040a02bfa67..d403deaa108 100644
--- a/compiler/rustc_thread_pool/src/spawn/mod.rs
+++ b/compiler/rustc_thread_pool/src/spawn/mod.rs
@@ -95,7 +95,7 @@ where
 
     HeapJob::new(Tlv::null(), {
         let registry = Arc::clone(registry);
-        move || {
+        move |_| {
             registry.catch_unwind(func);
             registry.terminate(); // (*) permit registry to terminate now
         }
diff --git a/compiler/rustc_thread_pool/src/spawn/tests.rs b/compiler/rustc_thread_pool/src/spawn/tests.rs
index 8a70d2faf9c..a4989759cf9 100644
--- a/compiler/rustc_thread_pool/src/spawn/tests.rs
+++ b/compiler/rustc_thread_pool/src/spawn/tests.rs
@@ -167,6 +167,7 @@ macro_rules! test_order {
 }
 
 #[test]
+#[ignore]
 #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)]
 fn lifo_order() {
     // In the absence of stealing, `spawn()` jobs on a thread will run in LIFO order.
@@ -176,6 +177,7 @@ fn lifo_order() {
 }
 
 #[test]
+#[ignore]
 #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)]
 fn fifo_order() {
     // In the absence of stealing, `spawn_fifo()` jobs on a thread will run in FIFO order.
@@ -185,6 +187,7 @@ fn fifo_order() {
 }
 
 #[test]
+#[ignore]
 #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)]
 fn lifo_fifo_order() {
     // LIFO on the outside, FIFO on the inside
@@ -194,6 +197,7 @@ fn lifo_fifo_order() {
 }
 
 #[test]
+#[ignore]
 #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)]
 fn fifo_lifo_order() {
     // FIFO on the outside, LIFO on the inside
@@ -230,6 +234,7 @@ macro_rules! test_mixed_order {
 }
 
 #[test]
+#[ignore]
 #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)]
 fn mixed_lifo_fifo_order() {
     let vec = test_mixed_order!(spawn, spawn_fifo);
@@ -238,6 +243,7 @@ fn mixed_lifo_fifo_order() {
 }
 
 #[test]
+#[ignore]
 #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)]
 fn mixed_fifo_lifo_order() {
     let vec = test_mixed_order!(spawn_fifo, spawn);