new WorkerThread(parentPool)
Worker thread.
Parameters:
Name | Type | Description |
---|---|---|
parentPool | object | The parent pool. |
- Source
Methods
getId() → {string}
Get the thread ID.
- Source
Returns:
The thread ID (alphanumeric).
- Type:
- string
run(workerTask)
Run a worker task
Parameters:
Name | Type | Description |
---|---|---|
workerTask | object | The task to run. |
- Source
stop()
Finish a task and tell the parent.
- Source