X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIWorker.html;h=c915a559881645f37096e76e772c6b8aea658d85;hb=d3a9c958dcc326062e978f22d88747c00522032d;hp=0faccb8db8bb737deea8c7e52c1bbd59c08c191b;hpb=52a04779d6d7fce6b3db10d1abf5e03b42ea9723;p=poolifier.git diff --git a/docs/interfaces/IWorker.html b/docs/interfaces/IWorker.html index 0faccb8d..c915a559 100644 --- a/docs/interfaces/IWorker.html +++ b/docs/interfaces/IWorker.html @@ -1,21 +1,126 @@ -IWorker | poolifier - v3.1.1

Interface IWorker

Worker interface.

-
interface IWorker {
    disconnect?: (() => void);
    id?: number;
    kill?: ((signal?) => void);
    on: ((event, handler) => void);
    once: ((event, handler) => void);
    terminate?: (() => Promise<number>);
    threadId?: number;
}

Properties

disconnect?: (() => void)

Type declaration

    • (): void
    • Cluster worker disconnect.

      -

      Returns void

id?: number

Cluster worker id.

-
kill?: ((signal?) => void)

Type declaration

    • (signal?): void
    • Cluster worker kill.

      -

      Parameters

      • Optional signal: string

      Returns void

on: ((event, handler) => void)

Type declaration

once: ((event, handler) => void)

Type declaration

terminate?: (() => Promise<number>)

Type declaration

threadId?: number

Worker thread worker id.

-

Generated using TypeDoc

\ No newline at end of file +

Type declaration

threadId?: number

Worker thread worker id.

+
unref?: (() => void)

Calling unref() on a worker allows the thread to exit if this is the only +active handle in the event system. If the worker is already unref()ed callingunref() again has no effect.

+

Type declaration

Since

v10.5.0

+

Methods

Generated using TypeDoc

\ No newline at end of file