representation of a thread assigned to a worker script executes the PHP worker script in a loop implements the threadHandler interface
| 17 | // executes the PHP worker script in a loop |
| 18 | // implements the threadHandler interface |
| 19 | type workerThread struct { |
| 20 | state *state.ThreadState |
| 21 | thread *phpThread |
| 22 | worker *worker |
| 23 | dummyFrankenPHPContext *frankenPHPContext |
| 24 | dummyContext context.Context |
| 25 | workerFrankenPHPContext *frankenPHPContext |
| 26 | workerContext context.Context |
| 27 | isBootingScript bool // true if the worker has not reached frankenphp_handle_request yet |
| 28 | failureCount int // number of consecutive startup failures |
| 29 | requestCount int // number of requests handled since last restart |
| 30 | } |
| 31 | |
| 32 | func convertToWorkerThread(thread *phpThread, worker *worker) { |
| 33 | thread.setHandler(&workerThread{ |
nothing calls this directly
no outgoing calls
no test coverage detected