cuprated/config/rayon.rs
1use serde::{Deserialize, Serialize};
2
3/// The [`rayon`] config.
4#[derive(Debug, Deserialize, Serialize, Eq, PartialEq)]
5#[serde(deny_unknown_fields, default)]
6pub struct RayonConfig {
7 /// The number of threads to use for the [`rayon::ThreadPool`].
8 pub threads: usize,
9}
10
11impl Default for RayonConfig {
12 fn default() -> Self {
13 Self {
14 threads: cuprate_helper::thread::threads_75().get(),
15 }
16 }
17}