X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIWorker.html;h=c915a559881645f37096e76e772c6b8aea658d85;hb=394676d15b59b7013b9d95889e47a4a49860b057;hp=ed706a0a54dbabb14b0afd44176f52ed1c199e7c;hpb=a470bbcf628a548eb345104761dbc9e7d7792809;p=poolifier.git diff --git a/docs/interfaces/IWorker.html b/docs/interfaces/IWorker.html index ed706a0a..c915a559 100644 --- a/docs/interfaces/IWorker.html +++ b/docs/interfaces/IWorker.html @@ -1,21 +1,126 @@ -IWorker | poolifier - v3.1.13

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