Skip to content

Commit

Permalink
perf: enable tinypool useAtomics in node env (#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Feb 16, 2022
1 parent d46b49b commit 88dcefa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/vitest/src/node/pool.ts
Expand Up @@ -62,10 +62,9 @@ export function createWorkerPool(ctx: Vitest): WorkerPool {

const options: TinypoolOptions = {
filename: workerPath,
// Disable this for now, for WebContainer capability
// Disable this for now for WebContainers
// https://github.com/vitest-dev/vitest/issues/93
// In future we could conditionally enable it based on the env
useAtomics: false,
useAtomics: typeof process.versions.webcontainer !== 'string',

maxThreads: ctx.config.maxThreads ?? threadsCount,
minThreads: ctx.config.minThreads ?? threadsCount,
Expand Down

0 comments on commit 88dcefa

Please sign in to comment.