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

Method beforeScriptExecution

threadtasks_test.go:44–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42}
43
44func (handler *taskThread) beforeScriptExecution() string {
45 thread := handler.thread
46
47 switch thread.state.Get() {
48 case state.TransitionRequested:
49 return thread.transitionToNewHandler()
50 case state.Booting, state.TransitionComplete:
51 thread.state.Set(state.Ready)
52 handler.waitForTasks()
53
54 return handler.beforeScriptExecution()
55 case state.Ready:
56 handler.waitForTasks()
57
58 return handler.beforeScriptExecution()
59 case state.ShuttingDown:
60 // signal to stop
61 return ""
62 }
63 panic("unexpected state: " + thread.state.Name())
64}
65
66func (handler *taskThread) afterScriptExecution(_ int) {
67 panic("task threads should not execute scripts")

Callers

nothing calls this directly

Calls 5

waitForTasksMethod · 0.95
GetMethod · 0.80
SetMethod · 0.80
NameMethod · 0.80

Tested by

no test coverage detected