rayon-core 1.7.0

Core APIs for Rayon
Documentation
1
2
3
4
5
6
7
8
9
10
use rayon_core::ThreadPoolBuilder;
use std::error::Error;

#[test]
fn double_init_fail() {
    let result1 = ThreadPoolBuilder::new().build_global();
    assert_eq!(result1.unwrap(), ());
    let err = ThreadPoolBuilder::new().build_global().unwrap_err();
    assert!(err.description() == "The global thread pool has already been initialized.");
}