MCPcopy Create free account
hub / github.com/base/base / tokio_runtime

Method tokio_runtime

crates/utilities/cli/src/runtime.rs:40–46  ·  view source on GitHub ↗

Creates a new default tokio multi-thread [Runtime](tokio::runtime::Runtime) with all features enabled.

(&self)

Source from the content-addressed store, hash-verified

38 /// Creates a new default tokio multi-thread [Runtime](tokio::runtime::Runtime) with all
39 /// features enabled.
40 pub fn tokio_runtime(&self) -> Result<tokio::runtime::Runtime, std::io::Error> {
41 let mut builder = tokio::runtime::Builder::new_multi_thread();
42 if let Some(size) = self.thread_stack_size {
43 builder.thread_stack_size(size);
44 }
45 builder.enable_all().build()
46 }
47
48 /// Installs SIGTERM + SIGINT handlers that cancel the given token.
49 ///

Callers 5

run_until_ctrl_cMethod · 0.80
run_until_shutdownMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80

Calls 1

buildMethod · 0.45

Tested by

no test coverage detected