import { AbstractWorker } from "https://deno.land/x/poolifier@v0.3.14/src/mod.ts";
Base class that implements some shared logic for all poolifier workers.
Constructors
Constructs a new poolifier worker.
Properties
Runs the given task function asynchronously.
Runs the given task function synchronously.
Performance statistics computation requirements.
Task function(s) processed by the worker when the pool's execution
function is invoked.
Methods
Checks if the worker should be terminated, because its living too long.
Check if the message worker id is set and matches the worker id.
Checks if the taskFunctions
parameter is passed to the constructor and valid.
Starts the worker check active interval.
Stops the worker check active interval.
Returns the main worker.
Handles an error and convert it to a string so it can be sent back to the main worker.
Handles a kill message sent by the main worker.
Handles the ready message event sent by the main worker.
Worker message event listener.
Sends task function names to the main worker.
Sends a message to main worker.
Adds a task function to the worker. If a task function with the same name already exists, it is replaced.
Checks if the worker has a task function with the given name.
Lists the names of the worker's task functions.
Removes a task function from the worker.
Sets the default task function to use in the worker.