• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

floatdrop / zoxy / 28698631268

04 Jul 2026 07:06AM UTC coverage: 96.506% (-0.003%) from 96.509%
28698631268

push

github

floatdrop
drain: graceful shutdown — SIGTERM drains workers, completes in-flight, then exits (Phase 4 slice 1)

Trigger: signals blocked everywhere + signalfd on main; each worker has a
recv pending on a socketpair, so the poke is an ordinary ring completion.
Per worker: cancel accept, close the listener (refuse > queue-and-ignore),
close idle keep-alive connections politely, force Connection: close on
in-flight responses via the existing injection, clamp every deadline to
now + drain_timeout so the ticking timers force-close stragglers. Exit
when every pool slot and server op drained; a second signal exits now.

Pool grows an in_use marker (drain sweep + honest dump_pool); the test IO
listener close now RSTs its accept queue like the kernel; HealthChecker
stop() cancels in-flight probes so a black-holed endpoint can't pin exit.

Verified: sim drains a third of iterations at a random step (seeds
0..2000), three integration tests, the zero-alloc gate drains inside it,
process-level idle+wedged+mid-drain mix, 60k req/s sanity bench in-band.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

6352 of 6582 relevant lines covered (96.51%)

0.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.41
src/sim.zig


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc