We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42d1d4f commit 67a9aa2Copy full SHA for 67a9aa2
tests/iter_panic.rs
@@ -1,6 +1,7 @@
1
extern crate rayon;
2
3
use rayon::prelude::*;
4
+use rayon::ThreadPoolBuilder;
5
use std::ops::Range;
6
use std::panic::{self, UnwindSafe};
7
use std::sync::atomic::{AtomicUsize, Ordering};
@@ -24,7 +25,9 @@ fn iter_panic() {
24
25
fn iter_panic_fuse() {
26
// We only use a single thread in order to make the behavior
27
// of 'panic_fuse' deterministic
- rayon::ThreadPoolBuilder::new().num_threads(1).build().unwrap().install(|| {
28
+ let pool = ThreadPoolBuilder::new().num_threads(1).build().unwrap();
29
+
30
+ pool.install(|| {
31
fn count(iter: impl ParallelIterator + UnwindSafe) -> usize {
32
let count = AtomicUsize::new(0);
33
let result = panic::catch_unwind(|| {
0 commit comments