X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FFixedThreadPool.html;h=6f287a30d4aaec6a76748b6d76e1305cb1582d36;hb=bb379737d9bdc595e5265c63c327260b9d15a201;hp=cad736ea1cc2a5d56e3b58b17662dcba8b2e54f9;hpb=c62a9bbc12416e26acbb3b86b5090d6186b14b60;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index cad736ea..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,19 +324,19 @@
Protected
worker-- get worker(): "cluster" | "thread"
+- get worker(): "thread" | "cluster"
-
-
The worker type.
Returns "cluster" | "thread"
+Returns "thread" | "cluster"
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
- internal
Busy(): boolean
-
-
- 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
+- Defined in src/pools/thread/fixed.ts:77
+- Defined in src/pools/abstract-pool.ts:590
+- Defined in src/pools/abstract-pool.ts:548
+- Defined in src/pools/abstract-pool.ts:567
Hook
+- Defined in src/pools/abstract-pool.ts:756
Listener
+ - Defined in src/pools/abstract-pool.ts:1109
Executes the specified function in the worker constructor with the task data input parameter.
-Optional
data: DataThe task input data for the specified worker 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 worker function to execute. If not specified, the default worker 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,20 +589,20 @@ Can be overridden.
Protected
internalWhether worker nodes are executing at least one task.
+Whether worker nodes are executing concurrently their tasks quota or not.
Returns boolean
Worker nodes busyness boolean status.
+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.