Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { inspect, types } from 'node:util'
import assert from 'node:assert'
import { performance } from 'node:perf_hooks'
import { readFileSync } from 'node:fs'
import { amount as physicalCpuCount } from './physicalCpuCount'
import { availableParallelism } from 'node:os'
import {
type ReadyMessage,
type RequestMessage,
Expand Down Expand Up @@ -50,7 +50,7 @@ declare global {
}
}

const cpuCount: number = physicalCpuCount
const cpuCount: number = availableParallelism()

interface AbortSignalEventTargetAddOptions {
once: boolean
Expand Down
52 changes: 0 additions & 52 deletions src/physicalCpuCount.ts

This file was deleted.

100 changes: 0 additions & 100 deletions test/cpu-count.test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion test/options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ vi.mock(import('node:os'), async (importOriginal) => {
const original = await importOriginal()
return {
...original,
default: { ...original.default, cpus: () => Array(cpuCount) },
availableParallelism: () => cpuCount,
}
})

Expand Down
Loading