File tree Expand file tree Collapse file tree 12 files changed +14
-12
lines changed
Expand file tree Collapse file tree 12 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ and this project adheres to
88
99## [ Unreleased]
1010
11+ ## [ 0.0.4] - 2023-10-19
12+
1113### Fixed
1214
1315- Avoid null exception at sending message to worker.
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ You can implement a
119119a simple way by extending the class _ ThreadWorker_ :
120120
121121``` js
122- import { ThreadWorker } from ' https://deno.land/x/poolifier@v0.0.3 /src/index.ts'
122+ import { ThreadWorker } from ' https://deno.land/x/poolifier@v0.0.4 /src/index.ts'
123123
124124function yourFunction (data ) {
125125 // this will be executed in the worker thread,
@@ -140,7 +140,7 @@ import {
140140 DynamicThreadPool ,
141141 FixedThreadPool ,
142142 PoolEvents ,
143- } from ' https://deno.land/x/poolifier@v0.0.3 /src/index.ts'
143+ } from ' https://deno.land/x/poolifier@v0.0.4 /src/index.ts'
144144
145145// a fixed worker_threads pool
146146const pool = new FixedThreadPool (availableParallelism (), ' ./yourWorker.js' )
Original file line number Diff line number Diff line change 1- # [ API] ( https://deno.land/x/poolifier@v0.0.3 /src/index.ts )
1+ # [ API] ( https://deno.land/x/poolifier@v0.0.4 /src/index.ts )
22
33## Table of contents
44
Original file line number Diff line number Diff line change 22 availableParallelism ,
33 DynamicThreadPool ,
44 PoolEvents ,
5- } from 'https://deno.land/x/poolifier@v0.0.3 /src/index.ts'
5+ } from 'https://deno.land/x/poolifier@v0.0.4 /src/index.ts'
66
77const pool = new DynamicThreadPool (
88 Math . floor ( availableParallelism ( ) / 2 ) ,
Original file line number Diff line number Diff line change 22 availableParallelism ,
33 FixedThreadPool ,
44 PoolEvents ,
5- } from 'https://deno.land/x/poolifier@v0.0.3 /src/index.ts'
5+ } from 'https://deno.land/x/poolifier@v0.0.4 /src/index.ts'
66
77const pool = new FixedThreadPool (
88 availableParallelism ( ) ,
Original file line number Diff line number Diff line change 11import {
22 availableParallelism ,
33 FixedThreadPool ,
4- } from 'https://deno.land/x/poolifier@v0.0.3 /src/index.ts'
4+ } from 'https://deno.land/x/poolifier@v0.0.4 /src/index.ts'
55
66const pool = new FixedThreadPool (
77 availableParallelism ( ) ,
Original file line number Diff line number Diff line change 1- import { ThreadWorker } from 'https://deno.land/x/poolifier@v0.0.3 /src/index.ts'
1+ import { ThreadWorker } from 'https://deno.land/x/poolifier@v0.0.4 /src/index.ts'
22
33function fn0 ( data ) {
44 console . info ( 'Executing fn0' )
Original file line number Diff line number Diff line change 1- import { ThreadWorker } from 'https://deno.land/x/poolifier@v0.0.3 /src/index.ts'
1+ import { ThreadWorker } from 'https://deno.land/x/poolifier@v0.0.4 /src/index.ts'
22
33function yourFunction ( ) {
44 for ( let i = 0 ; i <= 1000 ; i ++ ) {
Original file line number Diff line number Diff line change 22 availableParallelism ,
33 DynamicThreadPool ,
44 FixedThreadPool ,
5- } from 'https://deno.land/x/poolifier@v0.0.3 /src/index.ts'
5+ } from 'https://deno.land/x/poolifier@v0.0.4 /src/index.ts'
66import type { MyData , MyResponse } from './worker.ts'
77
88const workerFileURL = new URL (
Original file line number Diff line number Diff line change 1- import { ThreadWorker } from 'https://deno.land/x/poolifier@v0.0.3 /src/index.ts'
1+ import { ThreadWorker } from 'https://deno.land/x/poolifier@v0.0.4 /src/index.ts'
22
33export interface MyData {
44 ok : 0 | 1
You can’t perform that action at this time.
0 commit comments