Skip to content

Commit 0e3cbf4

Browse files
sheremet-vaAriPerkkio
authored andcommitted
fix: use availableParallelism instead of exec
1 parent 6422505 commit 0e3cbf4

File tree

2 files changed

+2
-54
lines changed

2 files changed

+2
-54
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { inspect, types } from 'node:util'
1111
import assert from 'node:assert'
1212
import { performance } from 'node:perf_hooks'
1313
import { readFileSync } from 'node:fs'
14-
import { amount as physicalCpuCount } from './physicalCpuCount'
14+
import { availableParallelism } from 'node:os'
1515
import {
1616
type ReadyMessage,
1717
type RequestMessage,
@@ -50,7 +50,7 @@ declare global {
5050
}
5151
}
5252

53-
const cpuCount: number = physicalCpuCount
53+
const cpuCount: number = availableParallelism()
5454

5555
interface AbortSignalEventTargetAddOptions {
5656
once: boolean

src/physicalCpuCount.ts

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)