Something went wrong. Try again.
fork of gitlab.com/devnw/zig/thread-pool for zig 0.17
Something went wrong. Try again.
devnw-thread-pool docs
3 folders · 27 files
README.md
thread-pool Documentation #
Documentation for setup, API usage, testing, benchmarking, algorithms, and performance history.
Start Here #
- Getting Started — install, build, first pool
- API Reference — every public symbol
- Examples — batch submit, blocking lanes, cancellation
- FAQ
Architecture & Algorithms #
- Architecture — component layout + ownership rules
- Design — rationale, queue design, memory model, shutdown
- Algorithms — mermaid diagrams for each pipeline (submit flow, worker loop, descriptor lifecycle, DescCache, Chase-Lev deque, RingQueue SPMC, Vyukov MPMC, wake coalescing, lane routing, watchdog, shutdown)
- Scheduler Decision — variant-picking rubric
Testing & Benchmarks #
- Testing — validation matrix, TSan, fuzz, stress gate
- Benchmarks — scenario matrix, measurement protocol, current snapshot, A/B loop reference
- Runtime Comparison — Zig vs Tokio vs Go same-host snapshot + analysis
- Performance Tracking — long-form per-phase delta history
Security #
- AppSec Review (2026-04-15) — full-src audit; all 7 priority findings fixed.
- AppSec Remediation FINAL — end-to-end performance ledger + same-compiler bisect + optimisation pass.
- TSan Baseline Findings —
zero warnings on current
main. - Remediation Plan — the 11-task plan that produced the fixes.
- SEC-018 —
wait()idempotency ADR - REV-001 —
task_fnpanic contract ADR
Gap Analyses #
- Gap Analysis (current)
- Gap Analysis Resolved
- Quality Gap Analysis
- Performance Gap Analysis
- Performance Targets
Performance Archive #
Chronological (most recent first):
- 2026-04-17 Go-gap round 3 (FAILED) — externalised per-worker DescCache reverted; indirection cost dominated Worker-size savings on all 3 primary targets. Closed plane.
- 2026-04-17 Go-gap round 2 (FAILED) — lifo-rotate + batched submitBatch both reverted; closed-plane reference for future rounds.
- 2026-04-16 Go-gap contended (DescCache landing) —
nested_fanout_4x +81.26%;contended_spawn_8x +35.98%;contended_cpu_10us +31.71%. - 2026-04-15 AppSec Remediation Perf Ledger —
BASELINE → per-step → FINAL, same-compiler bisect,
-Dsingle-pooloptimisation data. - 2026-04-15 Direct Runtime Comparison
- 2026-04-15 Post-Gen-Tag Profile
- 2026-04-14 Scratch Fast-Path + Idle Queue (reverted)
Handoffs & Reviews #
- Current Handoff (2026-04-15)
- Previous Handoff (2026-04-14)
- 2026-04-14 Codex Review
- Gap Closure Report (2026-04-16)