Blocking Threads Customization¶
SWS allows limiting the number of blocking threads powered by the Tokio runtime.
This feature can be controlled by the numeric -b, --max-blocking-threads
option or the equivalent SERVER_MAX_BLOCKING_THREADS env.
WebAssembly
We use 20
in Wasm by default and 512
in native environments (Tokio's default). See Tokio max_blocking_threads
API for more details.
Below is an example.
static-web-server \
--port 8787 \
--root ./my-public-dir \
--max-blocking-threads 20