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

Function addWorkerThread

scaling.go:76–84  ·  view source on GitHub ↗
(worker *worker)

Source from the content-addressed store, hash-verified

74}
75
76func addWorkerThread(worker *worker) (*phpThread, error) {
77 thread := getInactivePHPThread()
78 if thread == nil {
79 return nil, ErrMaxThreadsReached
80 }
81 convertToWorkerThread(thread, worker)
82 thread.state.WaitFor(state.Ready, state.ShuttingDown, state.Reserved)
83 return thread, nil
84}
85
86// scaleWorkerThread adds a worker PHP thread automatically
87func scaleWorkerThread(worker *worker, done chan struct{}, mstate *state.ThreadState) {

Callers 1

scaleWorkerThreadFunction · 0.85

Calls 3

getInactivePHPThreadFunction · 0.85
convertToWorkerThreadFunction · 0.85
WaitForMethod · 0.80

Tested by

no test coverage detected