Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
return this.tasksQueue.size >= this.tasksQueueBackPressureSize
}
- /** @inheritdoc */
- public resetUsage (): void {
- this.usage = this.initWorkerUsage()
- this.taskFunctionsUsage.clear()
- }
-
/** @inheritdoc */
public async terminate (): Promise<void> {
const waitWorkerExit = new Promise<void>(resolve => {
* @returns `true` if the worker node has back pressure, `false` otherwise.
*/
readonly hasBackPressure: () => boolean
- /**
- * Resets usage statistics.
- */
- readonly resetUsage: () => void
/**
* Terminates the worker node.
*/