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

Method MarkAsWaiting

internal/state/state.go:197–203  ·  view source on GitHub ↗

MarkAsWaiting hints that the thread reached a stable state and is waiting for requests or shutdown

(isWaiting bool)

Source from the content-addressed store, hash-verified

195
196// MarkAsWaiting hints that the thread reached a stable state and is waiting for requests or shutdown
197func (ts *ThreadState) MarkAsWaiting(isWaiting bool) {
198 if isWaiting {
199 ts.waitingSince.Store(time.Now().UnixMilli())
200 } else {
201 ts.waitingSince.Store(0)
202 }
203}
204
205// IsInWaitingState returns true if a thread is waiting for a request or shutdown
206func (ts *ThreadState) IsInWaitingState() bool {

Callers 3

waitForWorkerRequestMethod · 0.80
beforeScriptExecutionMethod · 0.80
waitForRequestMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected