Skip to content

Run HTTP server tasks on the interactive thread pool - #1344

Merged
quinnj merged 2 commits into
masterfrom
codex/interactive-server-threadpool
Aug 6, 2026
Merged

Run HTTP server tasks on the interactive thread pool#1344
quinnj merged 2 commits into
masterfrom
codex/interactive-server-threadpool

Conversation

@quinnj

@quinnj quinnj commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • schedule HTTP listener, connection, HTTP/2 stream, timeout-handler, server-side SSE, and WebSocket server tasks on Julia's :interactive thread pool
  • add a regression test that keeps the server responsive while every default-pool thread runs non-yielding work
  • document how to configure and verify an interactive thread, the default-pool fallback, and the need to offload non-yielding handler compute

Why

Reseau's foreign thread performs readiness polling. It does not execute Julia request or handler tasks. HTTP.jl v2 had moved the server task tree to the default pool, so non-yielding default-pool compute could still prevent health checks and other HTTP work from running.

This restores the isolation that HTTP.jl v1 provided. The scheduling choice is intentional and is not configurable. If no interactive thread exists, Julia falls back to the default pool.

Fixes #1342.

Validation

  • full test suite on Julia 1.12 with --threads=2,1
  • starvation regression with all default-pool threads occupied
  • HTTP/1, HTTP/2, timeout-handler, SSE, and WebSocket pool assertions
  • Julia 1.10 real-server fallback check with zero interactive threads
  • Documenter build, doctests, cross-references, and document checks
  • git diff --check

Co-authored by Codex

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.44%. Comparing base (8e9b80a) to head (d86edb6).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1344      +/-   ##
==========================================
+ Coverage   88.38%   88.44%   +0.06%     
==========================================
  Files          30       31       +1     
  Lines       11923    11930       +7     
==========================================
+ Hits        10538    10552      +14     
+ Misses       1385     1378       -7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Preserve the existing task error behavior while selecting the interactive pool. Wrapping server tasks in errormonitor pulls Base error-display I/O into JuliaC strict trim compilation on Julia 1.13 and produces unresolved dynamic calls.
@quinnj
quinnj merged commit 3515533 into master Aug 6, 2026
13 of 14 checks passed
@quinnj
quinnj deleted the codex/interactive-server-threadpool branch August 6, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

interactive threadpool question

1 participant