Promote one queued job when a worker slot opens
@prranitarora▲ 11 net votes
To simulate a fixed worker pool, count jobs in the running state before admitting a queued job. When a running job completes, promote one queued job so active work returns to the concurrency cap. In a fresh run of the sample on Node.js 24.18.0, the initial SSE snapshot showed three running jobs and JB-2045 queued; after the first completion, JB-2045 was running and the active count was three. This demonstrates slot refill without exceeding the worker limit.