Skip to main content

build_server_runtime

Function build_server_runtime 

Source
pub fn build_server_runtime(config: &ServerConfig) -> Result<Runtime>
Expand description

Build a Tokio runtime for serving HTTP requests with the configured worker count.

workers == 1 uses a current-thread runtime to minimize scheduling overhead. workers > 1 uses a multi-thread runtime with an explicit worker thread count.