@@ -142,7 +142,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> constructor</h3>
142142 < li class ="tsd-description ">
143143 < aside class ="tsd-sources ">
144144 < ul >
145- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L45 "> src/WorkerManager.ts:45 </ a > </ li >
145+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L47 "> src/WorkerManager.ts:47 </ a > </ li >
146146 </ ul >
147147 </ aside >
148148 < h4 class ="tsd-type-parameters-title "> Type parameters</ h4 >
@@ -171,7 +171,7 @@ <h5>worker<wbr>Factory<span class="tsd-signature-symbol">: </span>function</h5>
171171 < li class ="tsd-description ">
172172 < aside class ="tsd-sources ">
173173 < ul >
174- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L50 "> src/WorkerManager.ts:50 </ a > </ li >
174+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L52 "> src/WorkerManager.ts:52 </ a > </ li >
175175 </ ul >
176176 </ aside >
177177 < h4 class ="tsd-returns-title "> Returns < span class ="tsd-signature-type "> Promise</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> ModuleThread</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> W</ span > < span class ="tsd-signature-symbol "> ></ span > < span class ="tsd-signature-symbol "> ></ span > </ h4 >
@@ -194,7 +194,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> _destroyed</h3>
194194 < div class ="tsd-signature tsd-kind-icon "> _destroyed< span class ="tsd-signature-symbol "> :</ span > < span class ="tsd-signature-type "> boolean</ span > < span class ="tsd-signature-symbol "> = false</ span > </ div >
195195 < aside class ="tsd-sources ">
196196 < ul >
197- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L43 "> src/WorkerManager.ts:43 </ a > </ li >
197+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L45 "> src/WorkerManager.ts:45 </ a > </ li >
198198 </ ul >
199199 </ aside >
200200 </ section >
@@ -204,7 +204,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> _running</h3>
204204 < div class ="tsd-signature tsd-kind-icon "> _running< span class ="tsd-signature-symbol "> :</ span > < span class ="tsd-signature-type "> boolean</ span > < span class ="tsd-signature-symbol "> = false</ span > </ div >
205205 < aside class ="tsd-sources ">
206206 < ul >
207- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L42 "> src/WorkerManager.ts:42 </ a > </ li >
207+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L44 "> src/WorkerManager.ts:44 </ a > </ li >
208208 </ ul >
209209 </ aside >
210210 </ section >
@@ -214,7 +214,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> logger</h3>
214214 < div class ="tsd-signature tsd-kind-icon "> logger< span class ="tsd-signature-symbol "> :</ span > < span class ="tsd-signature-type "> Logger</ span > </ div >
215215 < aside class ="tsd-sources ">
216216 < ul >
217- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L41 "> src/WorkerManager.ts:41 </ a > </ li >
217+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L43 "> src/WorkerManager.ts:43 </ a > </ li >
218218 </ ul >
219219 </ aside >
220220 </ section >
@@ -224,7 +224,7 @@ <h3><span class="tsd-flag ts-flagProtected">Protected</span> pool</h3>
224224 < div class ="tsd-signature tsd-kind-icon "> pool< span class ="tsd-signature-symbol "> :</ span > < span class ="tsd-signature-type "> Pool</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> ModuleThread</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> W</ span > < span class ="tsd-signature-symbol "> ></ span > < span class ="tsd-signature-symbol "> ></ span > </ div >
225225 < aside class ="tsd-sources ">
226226 < ul >
227- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L40 "> src/WorkerManager.ts:40 </ a > </ li >
227+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L42 "> src/WorkerManager.ts:42 </ a > </ li >
228228 </ ul >
229229 </ aside >
230230 </ section >
@@ -241,7 +241,7 @@ <h3>destroyed</h3>
241241 < li class ="tsd-description ">
242242 < aside class ="tsd-sources ">
243243 < ul >
244- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L63 "> src/WorkerManager.ts:63 </ a > </ li >
244+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L65 "> src/WorkerManager.ts:65 </ a > </ li >
245245 </ ul >
246246 </ aside >
247247 < h4 class ="tsd-returns-title "> Returns < span class ="tsd-signature-type "> boolean</ span > </ h4 >
@@ -258,7 +258,7 @@ <h3>running</h3>
258258 < li class ="tsd-description ">
259259 < aside class ="tsd-sources ">
260260 < ul >
261- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L59 "> src/WorkerManager.ts:59 </ a > </ li >
261+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L61 "> src/WorkerManager.ts:61 </ a > </ li >
262262 </ ul >
263263 </ aside >
264264 < h4 class ="tsd-returns-title "> Returns < span class ="tsd-signature-type "> boolean</ span > </ h4 >
@@ -279,7 +279,7 @@ <h3>call</h3>
279279 < aside class ="tsd-sources ">
280280 < p > Implementation of < a href ="../interfaces/WorkerManagerInterface.default.html "> default</ a > .< a href ="../interfaces/WorkerManagerInterface.default.html#call "> call</ a > </ p >
281281 < ul >
282- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L78 "> src/WorkerManager.ts:78 </ a > </ li >
282+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L82 "> src/WorkerManager.ts:82 </ a > </ li >
283283 </ ul >
284284 </ aside >
285285 < h4 class ="tsd-type-parameters-title "> Type parameters</ h4 >
@@ -327,7 +327,7 @@ <h3>completed</h3>
327327 < aside class ="tsd-sources ">
328328 < p > Implementation of < a href ="../interfaces/WorkerManagerInterface.default.html "> default</ a > .< a href ="../interfaces/WorkerManagerInterface.default.html#completed "> completed</ a > </ p >
329329 < ul >
330- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L94 "> src/WorkerManager.ts:94 </ a > </ li >
330+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L98 "> src/WorkerManager.ts:98 </ a > </ li >
331331 </ ul >
332332 </ aside >
333333 < h4 class ="tsd-returns-title "> Returns < span class ="tsd-signature-type "> Promise</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> void</ span > < span class ="tsd-signature-symbol "> ></ span > </ h4 >
@@ -338,16 +338,27 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</
338338 < a name ="destroy " class ="tsd-anchor "> </ a >
339339 < h3 > destroy</ h3 >
340340 < ul class ="tsd-signatures tsd-kind-method tsd-parent-kind-class ">
341- < li class ="tsd-signature tsd-kind-icon "> destroy< span class ="tsd-signature-symbol "> (</ span > < span class ="tsd-signature-symbol "> )</ span > < span class ="tsd-signature-symbol "> : </ span > < span class ="tsd-signature-type "> Promise</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> void</ span > < span class ="tsd-signature-symbol "> ></ span > </ li >
341+ < li class ="tsd-signature tsd-kind-icon "> destroy< span class ="tsd-signature-symbol "> (</ span > __namedParameters < span class =" tsd-signature-symbol " > ?: </ span > < span class =" tsd-signature-symbol " > { </ span > force < span class =" tsd-signature-symbol " > ?: </ span > < span class =" tsd-signature-type " > boolean </ span > < span class =" tsd-signature-symbol " > } </ span > < span class ="tsd-signature-symbol "> )</ span > < span class ="tsd-signature-symbol "> : </ span > < span class ="tsd-signature-type "> Promise</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> void</ span > < span class ="tsd-signature-symbol "> ></ span > </ li >
342342 </ ul >
343343 < ul class ="tsd-descriptions ">
344344 < li class ="tsd-description ">
345345 < aside class ="tsd-sources ">
346346 < p > Implementation of < a href ="../interfaces/WorkerManagerInterface.default.html "> default</ a > .< a href ="../interfaces/WorkerManagerInterface.default.html#destroy "> destroy</ a > </ p >
347347 < ul >
348- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L67 "> src/WorkerManager.ts:67 </ a > </ li >
348+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L69 "> src/WorkerManager.ts:69 </ a > </ li >
349349 </ ul >
350350 </ aside >
351+ < h4 class ="tsd-parameters-title "> Parameters</ h4 >
352+ < ul class ="tsd-parameters ">
353+ < li >
354+ < h5 > __namedParameters: < span class ="tsd-signature-symbol "> { </ span > force< span class ="tsd-signature-symbol "> ?: </ span > < span class ="tsd-signature-type "> boolean</ span > < span class ="tsd-signature-symbol "> }</ span > < span class ="tsd-signature-symbol "> = {}</ span > </ h5 >
355+ < ul class ="tsd-parameters ">
356+ < li class ="tsd-parameter ">
357+ < h5 > < span class ="tsd-flag ts-flagOptional "> Optional</ span > force< span class ="tsd-signature-symbol "> ?: </ span > < span class ="tsd-signature-type "> boolean</ span > </ h5 >
358+ </ li >
359+ </ ul >
360+ </ li >
361+ </ ul >
351362 < h4 class ="tsd-returns-title "> Returns < span class ="tsd-signature-type "> Promise</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> void</ span > < span class ="tsd-signature-symbol "> ></ span > </ h4 >
352363 </ li >
353364 </ ul >
@@ -363,7 +374,7 @@ <h3>queue</h3>
363374 < aside class ="tsd-sources ">
364375 < p > Implementation of < a href ="../interfaces/WorkerManagerInterface.default.html "> default</ a > .< a href ="../interfaces/WorkerManagerInterface.default.html#queue "> queue</ a > </ p >
365376 < ul >
366- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L85 "> src/WorkerManager.ts:85 </ a > </ li >
377+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L89 "> src/WorkerManager.ts:89 </ a > </ li >
367378 </ ul >
368379 </ aside >
369380 < h4 class ="tsd-type-parameters-title "> Type parameters</ h4 >
@@ -411,7 +422,7 @@ <h3>settled</h3>
411422 < aside class ="tsd-sources ">
412423 < p > Implementation of < a href ="../interfaces/WorkerManagerInterface.default.html "> default</ a > .< a href ="../interfaces/WorkerManagerInterface.default.html#settled "> settled</ a > </ p >
413424 < ul >
414- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L101 "> src/WorkerManager.ts:101 </ a > </ li >
425+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L105 "> src/WorkerManager.ts:105 </ a > </ li >
415426 </ ul >
416427 </ aside >
417428 < h4 class ="tsd-returns-title "> Returns < span class ="tsd-signature-type "> Promise</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> Error</ span > < span class ="tsd-signature-symbol "> []</ span > < span class ="tsd-signature-symbol "> ></ span > </ h4 >
@@ -428,7 +439,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> create<wbr>Worker<wbr>Man
428439 < li class ="tsd-description ">
429440 < aside class ="tsd-sources ">
430441 < ul >
431- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L23 "> src/WorkerManager.ts:23 </ a > </ li >
442+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L25 "> src/WorkerManager.ts:25 </ a > </ li >
432443 </ ul >
433444 </ aside >
434445 < div class ="tsd-comment tsd-typography ">
@@ -440,7 +451,9 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> create<wbr>Worker<wbr>Man
440451 The < code > workerPath</ code > must point to a worker script
441452 The < code > workerPath</ code > can be either an absolute path or relative path
442453 If it is a relative path, it has to be relative to the file location where
443- the function expression is defined</ p >
454+ the function expression is defined
455+ If < code > cores</ code > is set to 0, this creates a useless worker pool
456+ Use < code > undefined</ code > to mean using all cores</ p >
444457 </ div >
445458 </ div >
446459 < h4 class ="tsd-type-parameters-title "> Type parameters</ h4 >
@@ -469,7 +482,7 @@ <h5>worker<wbr>Factory<span class="tsd-signature-symbol">: </span>function</h5>
469482 < li class ="tsd-description ">
470483 < aside class ="tsd-sources ">
471484 < ul >
472- < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/867b409 /src/WorkerManager.ts#L28 "> src/WorkerManager.ts:28 </ a > </ li >
485+ < li > Defined in < a href ="https://github.com/MatrixAI/js-workers/blob/master /src/WorkerManager.ts#L30 "> src/WorkerManager.ts:30 </ a > </ li >
473486 </ ul >
474487 </ aside >
475488 < h4 class ="tsd-returns-title "> Returns < span class ="tsd-signature-type "> Promise</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> ModuleThread</ span > < span class ="tsd-signature-symbol "> <</ span > < span class ="tsd-signature-type "> W</ span > < span class ="tsd-signature-symbol "> ></ span > < span class ="tsd-signature-symbol "> ></ span > </ h4 >
0 commit comments