Skip to content

Commit 3babef1

Browse files
AtsushiSakaiquinnj
andauthored
Add description about interactive thread pool (#1054)
* Add description about interactive thread pool * Update docs/src/server.md --------- Co-authored-by: Jacob Quinn <[email protected]>
1 parent 3d91872 commit 3babef1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/src/server.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,9 @@ Lower-level core server functionality that only operates on `HTTP.Stream`. Provi
107107
## Log formatting
108108

109109
Nginx-style log formatting is supported via the [`HTTP.@logfmt_str`](@ref) macro and can be passed via the `access_log` keyword argument for [`HTTP.listen`](@ref) or [`HTTP.serve`](@ref).
110+
111+
## Serving on the interactive thead pool
112+
113+
Beginning in Julia 1.9, the main server loop is spawned on the [interactive threadpool](https://docs.julialang.org/en/v1.9/manual/multi-threading/#man-threadpools) by default. If users do a Threads.@spawn from a handler, those threaded tasks should run elsewhere and not in the interactive threadpool, keeping the web server responsive.
114+
115+
Note that just having a reserved interactive thread doesn’t guarantee CPU cycles, so users need to properly configure their running Julia session appropriately (i.e. ensuring non-interactive threads available to run tasks, etc).

0 commit comments

Comments
 (0)