* run, but only when a warm worker is idle right now, so the call * starts at once; null, with nothing queued, when every worker is busy or * none has finished its cold start. For a caller that has its own way to * answer and must not wait behind other calls: the prompt hook (#3284)
(toolName: string, args: Record<string, unknown>)
| 486 | * queue), so the job goes straight to it. |
| 487 | */ |
| 488 | tryRun(toolName: string, args: Record<string, unknown>): Promise<ToolResult> | null { |
| 489 | if (!this.healthy || !this.ready || this.idle.length === 0) return null; |
| 490 | return this.run(toolName, args); |
| 491 | } |
| 492 | |
| 493 | private startSettled(w: PoolWorker): void { |
| 494 | const start = this.starts.get(w); |
no test coverage detected