Skip to content

Commit

Permalink
fix(browser): resolve thread count from maxWorkers (#7483)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio authored Feb 13, 2025
1 parent 8fe641b commit adbb25a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/browser/src/node/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ export function createBrowserPool(vitest: Vitest): ProcessPool {
return 1
}

if (project.config.maxWorkers) {
return project.config.maxWorkers
}

return vitest.config.watch
? Math.max(Math.floor(numCpus / 2), 1)
: Math.max(numCpus - 1, 1)
Expand Down

0 comments on commit adbb25a

Please sign in to comment.