We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64c38cd commit dc8e7f1Copy full SHA for dc8e7f1
apps/sim/lib/execution/isolated-vm.ts
@@ -980,7 +980,8 @@ function drainQueue() {
980
while (queueLength() > 0 && totalActiveExecutions < MAX_CONCURRENT) {
981
const worker = selectWorker()
982
if (!worker) {
983
- const currentPoolSize = workers.size + spawnInProgress
+ const activeWorkerCount = [...workers.values()].filter((w) => !w.retiring).length
984
+ const currentPoolSize = activeWorkerCount + spawnInProgress
985
if (currentPoolSize < POOL_SIZE) {
986
spawnWorker()
987
.then(() => drainQueue())
0 commit comments