cuprated/config/
tokio.rs

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