MCPcopy Index your code
hub / github.com/php/frankenphp / DrainWorkers

Function DrainWorkers

worker.go:174–176  ·  view source on GitHub ↗

EXPERIMENTAL: DrainWorkers initiates a graceful drain of all worker scripts. Blocks until every drained thread yields. Force-kill is armed after a grace period to wake threads parked in blocking syscalls (sleep, I/O).

()

Source from the content-addressed store, hash-verified

172// Blocks until every drained thread yields. Force-kill is armed after a
173// grace period to wake threads parked in blocking syscalls (sleep, I/O).
174func DrainWorkers() {
175 _ = drainWorkerThreads()
176}
177
178func drainWorkerThreads() (drainedThreads []*phpThread) {
179 var ready sync.WaitGroup

Callers

nothing calls this directly

Calls 1

drainWorkerThreadsFunction · 0.85

Tested by

no test coverage detected