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

Method waitForTasks

threadtasks_test.go:84–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82func (handler *taskThread) drain() {}
83
84func (handler *taskThread) waitForTasks() {
85 for {
86 select {
87 case task := <-handler.execChan:
88 task.callback()
89 task.done.Unlock() // unlock the task to signal completion
90 case <-handler.thread.drainChan:
91 // thread is shutting down, do not execute the function
92 return
93 }
94 }
95}
96
97func (handler *taskThread) execute(t *task) {
98 handler.execChan <- t

Callers 1

beforeScriptExecutionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected