X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=6f287a30d4aaec6a76748b6d76e1305cb1582d36;hb=f7d06005106fbf8e845731e6652dd676b765f60e;hp=099206139e29173127d6ca262d7b9a986368288c;hpb=6b83e544b1827a8a04898c3032dab73fe19687e6;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index 09920613..6f287a30 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -1,4 +1,4 @@ -
Emitter on which events can be listened to.
Events that can currently be listened to:
-
+
+- '
@@ -160,7 +163,7 @@ +'full'
: Emitted when the pool is dynamic and the number of workers created has reached the maximum size expected.'ready'
: Emitted when the number of workers created in the pool has reached the minimum size expected and are ready.'busy'
: Emitted when the number of workers created in the pool has reached the maximum size expected and are executing at least one task.'full'
: Emitted when the pool is dynamic and the number of workers created has reached the maximum size expected.destroy
': Emitted when the pool is destroyed.'error'
: Emitted when an uncaught error occurs.'taskError'
: Emitted when an error occurs while executing a task.Protected
Readonly
fileProtected
Readonly
numberProtected
Readonly
optsProtected
promiseProtected
workerReadonly
workerAccessors
Protected
full@@ -247,7 +250,7 @@
info
@@ -259,7 +262,7 @@
Protected
max@@ -271,7 +274,7 @@
Protected
min@@ -283,7 +286,7 @@
Private
ready@@ -295,7 +298,7 @@
Protected
type@@ -308,7 +311,7 @@
Private
utilization@@ -321,7 +324,7 @@
Protected
worker@@ -333,7 +336,7 @@
Methods
Protected
after@@ -382,7 +385,7 @@ Can be overridden.
Protected
before@@ -408,7 +411,7 @@ Can be overridden.
Protected
check@@ -424,7 +427,7 @@ Can be overridden.
Returns void
Protected
create@@ -437,7 +440,7 @@ Can be overridden.
Protected
create@@ -450,7 +453,7 @@ Can be overridden.
Protected
create@@ -463,7 +466,7 @@ Can be overridden.
destroy
@@ -475,7 +478,7 @@ Can be overridden.
Protected
destroy@@ -495,7 +498,7 @@ Can be overridden.
enable Tasks Queue
@@ -520,11 +523,11 @@ Can be overridden.
execute
-- execute(data?, name?): Promise<Response>
+- execute(data?, name?, transferList?): Promise<Response>
-
@@ -533,12 +536,17 @@ Can be overridden.
-
-
+
+-
+
+- Defined in src/pools/abstract-pool.ts:659
Tasks Queue
+- Defined in src/pools/abstract-pool.ts:1241
Worker Info
+- Defined in src/pools/abstract-pool.ts:1180
Busy
+- Defined in src/pools/abstract-pool.ts:629
Main
+- Defined in src/pools/thread/fixed.ts:55
+
+
Worker Message Listener
+- Defined in src/pools/thread/fixed.ts:104
+
+
Startup Message To Worker
+- Defined in src/pools/thread/fixed.ts:88
To Worker
Executes the specified function in the worker constructor with the task data input parameter.
-Optional
data: DataThe task input data for the specified task function. This can only be structured-cloneable data.
+The optional task input data for the specified task function. This can only be structured-cloneable data.
-Optional
name: stringThe name of the task function to execute. If not specified, the default task function will be executed.
+The optional name of the task function to execute. If not specified, the default task function will be executed.
+
+Optional
transferList: TransferListItem[]An optional array of transferable objects to transfer ownership of. Ownership of the transferred objects is given to the pool's worker_threads worker and they should not be used in the main thread afterwards.
Returns Promise<Response>
Promise that will be fulfilled when the task is completed.
@@ -546,7 +554,7 @@ Can be overridden.Protected
flush@@ -560,7 +568,7 @@ Can be overridden.
Returns void
Protected
get@@ -581,7 +589,7 @@ Can be overridden.
Protected
internal@@ -594,7 +602,7 @@ Can be overridden.
Protected
is@@ -606,7 +614,20 @@ Can be overridden.
list Task Functions
++- list
Task Functions(): string[]
+-
+
+
Lists the names of task function available in this pool.
+Returns string[]
The names of task function available in this pool.
+ +Protected
register@@ -647,7 +668,23 @@ Can be overridden.
Kill Message To Worker
+Protected
send+- send
Kill Message To Worker(workerNodeKey, workerId): Promise<void>
+-
+
+
+
Parameters
++-
+
+-
+
workerNodeKey: number
workerId: number
Returns Promise<void>
Protected
send@@ -667,11 +704,11 @@ Can be overridden.
Protected
send-- send
To Worker(workerNodeKey, message): void
+- send
To Worker(workerNodeKey, message, transferList?): void
-
@@ -687,12 +724,17 @@ Can be overridden.
+
+-
+
Sends a message to worker given its worker node key.
message: MessageValue<Data, unknown>
The message.
+Optional
transferList: TransferListItem[]The optional array of transferable objects.
+Returns void
set Tasks Queue Options
@@ -712,7 +754,7 @@ Can be overridden.
set Worker Choice Strategy
@@ -737,7 +779,7 @@ Can be overridden.
set Worker Choice Strategy Options
@@ -757,7 +799,7 @@ Can be overridden.
Protected
setup@@ -770,7 +812,7 @@ Can be overridden.
Protected
worker@@ -798,7 +840,7 @@ Can be overridden.