From 0ff5d17b8116b4afcd728c900cc06075002dbb81 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Wed, 7 Oct 2020 15:53:35 +0100 Subject: [PATCH] Fix `verbose_mode` test This one is easier to "fix", since we're in control of the rayon pool - just adding one extra thread to the default number to make sure we always can one root "spawn" call without stealing from the actual pool. --- tests/flags.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/flags.rs b/tests/flags.rs index fba5eb38..69d79f6a 100644 --- a/tests/flags.rs +++ b/tests/flags.rs @@ -118,6 +118,7 @@ fn verbose_mode() { #[cfg(feature = "rayon")] rayon::ThreadPoolBuilder::new() .start_handler(move |_| thread_init()) + .num_threads(rayon::current_num_threads() + 1) .build() .unwrap() .install(move || rayon::spawn(thread_exec));