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

Method isAtThreadLimit

worker.go:278–288  ·  view source on GitHub ↗

check if max_threads has been reached

()

Source from the content-addressed store, hash-verified

276
277// check if max_threads has been reached
278func (worker *worker) isAtThreadLimit() bool {
279 if worker.maxThreads <= 0 {
280 return false
281 }
282
283 worker.threadMutex.RLock()
284 atMaxThreads := len(worker.threads) >= worker.maxThreads
285 worker.threadMutex.RUnlock()
286
287 return atMaxThreads
288}
289
290func (worker *worker) handleRequest(ch contextHolder) error {
291 metrics.StartWorkerRequest(worker.name)

Callers 2

handleRequestMethod · 0.95
startUpscalingThreadsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected