diff --git a/server/src/config.rs b/server/src/config.rs index 1145c51..dc8dfa9 100644 --- a/server/src/config.rs +++ b/server/src/config.rs @@ -67,6 +67,9 @@ pub enum RuntimeFlavor { /// Multi-threaded tokio runtime. #[default] MultiThread, + /// Alternate multi-threaded tokio runtime. + #[cfg(tokio_unstable)] + MultiThreadAlt, } pub type BindAddr = (SocketType, String); diff --git a/server/src/main.rs b/server/src/main.rs index 9076636..8a75189 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -1,5 +1,6 @@ #![feature(ip)] #![deny(clippy::todo)] +#![allow(unexpected_cfgs)] use std::{fs::read_to_string, net::IpAddr}; @@ -112,6 +113,8 @@ fn main() -> anyhow::Result<()> { let mut builder: runtime::Builder = match CONFIG.server.runtime { RuntimeFlavor::SingleThread => runtime::Builder::new_current_thread(), RuntimeFlavor::MultiThread => runtime::Builder::new_multi_thread(), + #[cfg(tokio_unstable)] + RuntimeFlavor::MultiThreadAlt => runtime::Builder::new_multi_thread_alt(), }; builder.enable_all();