X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fpool.ts;h=144d55002bd048ea865365cb6696cdb887745230;hb=42791dc5018cb7e9c81500f5f5652007fc93b936;hp=57898d98a9d53a8c89c3d774847e9cae694a53fe;hpb=d35e571704515a8b729d3455e4784054f07c368f;p=poolifier.git diff --git a/examples/typescript/pool.ts b/examples/typescript/pool.ts index 57898d98..144d5500 100644 --- a/examples/typescript/pool.ts +++ b/examples/typescript/pool.ts @@ -12,7 +12,7 @@ const workerFile = join( `worker${extname(fileURLToPath(import.meta.url))}` ) -export const fixedPool = new FixedThreadPool>( +export const fixedPool = new FixedThreadPool( availableParallelism(), workerFile, { @@ -25,7 +25,7 @@ export const fixedPool = new FixedThreadPool>( } ) -export const dynamicPool = new DynamicThreadPool>( +export const dynamicPool = new DynamicThreadPool( Math.floor(availableParallelism() / 2), availableParallelism(), workerFile,