diff options
Diffstat (limited to 'compiler/rustc_thread_pool/src/scope/tests.rs')
| -rw-r--r-- | compiler/rustc_thread_pool/src/scope/tests.rs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/compiler/rustc_thread_pool/src/scope/tests.rs b/compiler/rustc_thread_pool/src/scope/tests.rs index 2df3bc67e29..049548f4a18 100644 --- a/compiler/rustc_thread_pool/src/scope/tests.rs +++ b/compiler/rustc_thread_pool/src/scope/tests.rs @@ -290,6 +290,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, `scope()` runs its `spawn()` jobs in LIFO order. @@ -299,6 +300,7 @@ fn lifo_order() { } #[test] +#[ignore] #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)] fn fifo_order() { // In the absence of stealing, `scope_fifo()` runs its `spawn_fifo()` jobs in FIFO order. @@ -334,6 +336,7 @@ macro_rules! test_nested_order { } #[test] +#[ignore] #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)] fn nested_lifo_order() { // In the absence of stealing, `scope()` runs its `spawn()` jobs in LIFO order. @@ -343,6 +346,7 @@ fn nested_lifo_order() { } #[test] +#[ignore] #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)] fn nested_fifo_order() { // In the absence of stealing, `scope_fifo()` runs its `spawn_fifo()` jobs in FIFO order. @@ -352,6 +356,7 @@ fn nested_fifo_order() { } #[test] +#[ignore] #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)] fn nested_lifo_fifo_order() { // LIFO on the outside, FIFO on the inside @@ -361,6 +366,7 @@ fn nested_lifo_fifo_order() { } #[test] +#[ignore] #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)] fn nested_fifo_lifo_order() { // FIFO on the outside, LIFO on the inside @@ -402,6 +408,7 @@ macro_rules! test_mixed_order { } #[test] +#[ignore] #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)] fn mixed_lifo_order() { // NB: the end of the inner scope makes us execute some of the outer scope @@ -412,6 +419,7 @@ fn mixed_lifo_order() { } #[test] +#[ignore] #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)] fn mixed_fifo_order() { let vec = test_mixed_order!(scope_fifo => spawn_fifo, scope_fifo => spawn_fifo); @@ -420,6 +428,7 @@ fn mixed_fifo_order() { } #[test] +#[ignore] #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)] fn mixed_lifo_fifo_order() { // NB: the end of the inner scope makes us execute some of the outer scope @@ -430,6 +439,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!(scope_fifo => spawn_fifo, scope => spawn); @@ -519,8 +529,9 @@ fn mixed_lifetime_scope_fifo() { #[test] fn scope_spawn_broadcast() { + let pool = ThreadPoolBuilder::new().num_threads(7).build().unwrap(); let sum = AtomicUsize::new(0); - let n = scope(|s| { + let n = pool.scope(|s| { s.spawn_broadcast(|_, ctx| { sum.fetch_add(ctx.index(), Ordering::Relaxed); }); @@ -531,8 +542,9 @@ fn scope_spawn_broadcast() { #[test] fn scope_fifo_spawn_broadcast() { + let pool = ThreadPoolBuilder::new().num_threads(7).build().unwrap(); let sum = AtomicUsize::new(0); - let n = scope_fifo(|s| { + let n = pool.scope_fifo(|s| { s.spawn_broadcast(|_, ctx| { sum.fetch_add(ctx.index(), Ordering::Relaxed); }); @@ -542,6 +554,7 @@ fn scope_fifo_spawn_broadcast() { } #[test] +#[ignore] fn scope_spawn_broadcast_nested() { let sum = AtomicUsize::new(0); let n = scope(|s| { |
