import { type IPool } from "https://deno.land/x/poolifier@v0.3.14/src/pools/pool.ts";
Contract definition for a poolifier pool.
Properties
Pool information.
Pool worker nodes.
Pool event target.
Events that can currently be listened to:
'ready'
: Emitted when the number of workers created in the pool has reached the minimum size expected and are ready. If the pool is dynamic with a minimum number of workers is set to zero, this event is emitted when at least one dynamic worker is ready.'busy'
: Emitted when the number of workers created in the pool has reached the maximum size expected and are executing concurrently their tasks quota.'full'
: Emitted when the pool is dynamic and the number of workers created has reached the maximum size expected.'empty'
: Emitted when the pool is dynamic with a minimum number of workers set to zero and the number of workers has reached the minimum size expected.'destroy'
: Emitted when the pool is destroyed.'error'
: Emitted when an uncaught error occurs.'messageerror'
: Emitted when an error occurs while processing a message event.'taskError'
: Emitted when an error occurs while executing a task.'backPressure'
: Emitted when all worker nodes have back pressure (i.e. their tasks queue is full: queue size >= maximum queue size).
Executes the specified function in the worker constructor with the task data input parameter.
Whether the specified task function exists in this pool.
Adds a task function to this pool. If a task function with the same name already exists, it will be overwritten.
Removes a task function from this pool.
Lists the names of task function available in this pool.
Sets the default task function in this pool.
Sets the worker choice strategy in this pool.
Sets the worker choice strategy options in this pool.
Enables/disables the worker node tasks queue in this pool.
Sets the worker node tasks queue options in this pool.