mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 05:50:01 -04:00
add multithreadalt try 2
This commit is contained in:
parent
74a77e247c
commit
4c19b207bf
2 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue