rouille

Function start_server_with_pool

Source
pub fn start_server_with_pool<A, F>(
    addr: A,
    pool_size: Option<usize>,
    handler: F,
) -> !
where A: ToSocketAddrs, F: Send + Sync + 'static + Fn(&Request) -> Response,
Expand description

Identical to start_server but uses a ThreadPool of the given size.

When pool_size is None, the thread pool size will default to 8 * num-cpus. pool_size must be greater than zero or this function will panic.