Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

25
vendor/rayon/tests/named-threads.rs vendored Normal file
View File

@@ -0,0 +1,25 @@
use std::collections::HashSet;
use rayon::prelude::*;
use rayon::*;
#[test]
#[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)]
fn named_threads() {
ThreadPoolBuilder::new()
.thread_name(|i| format!("hello-name-test-{i}"))
.build_global()
.unwrap();
const N: usize = 10000;
let thread_names = (0..N)
.into_par_iter()
.flat_map(|_| ::std::thread::current().name().map(str::to_owned))
.collect::<HashSet<String>>();
let all_contains_name = thread_names
.iter()
.all(|name| name.starts_with("hello-name-test-"));
assert!(all_contains_name);
}