diff --git a/src/commands.rs b/src/commands.rs index 9d7a4ed57..535eec45e 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -92,7 +92,9 @@ fn run_server_process(startup_timeout: Option) -> Result) -> Result Result { // If there is no server, spawning a new server would start with zero stats // anyways, so we can just return (mostly) empty stats directly. Err(_) => { - let runtime = Runtime::new()?; + let runtime = tokio::runtime::Builder::new_current_thread() + .enable_all() + .build()?; let storage = storage_from_config(config, runtime.handle()).ok(); runtime.block_on(ServerInfo::new(ServerStats::default(), storage.as_deref()))? } @@ -763,7 +769,9 @@ pub fn run_command(cmd: Command) -> Result { use crate::compiler; trace!("Command::PackageToolchain({})", executable.display()); - let runtime = Runtime::new()?; + let runtime = tokio::runtime::Builder::new_current_thread() + .enable_all() + .build()?; let jobserver = Client::new(); let creator = ProcessCommandCreator::new(&jobserver); let args: Vec<_> = env::args_os().collect(); @@ -807,7 +815,9 @@ pub fn run_command(cmd: Command) -> Result { let jobserver = Client::new(); let conn = connect_or_start_server(&get_addr(), startup_timeout)?; - let mut runtime = Runtime::new()?; + let mut runtime = tokio::runtime::Builder::new_current_thread() + .enable_all() + .build()?; let res = do_compile( ProcessCommandCreator::new(&jobserver), &mut runtime,