[−][src]Function rouille::start_server_with_pool
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,
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.