X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIWorker.html;h=d8cef72b5acc6e3fafb2d654b273d2b84d919e4d;hb=86de0a2d983a71579980758f52cf4c7f1c16abf8;hp=b9e37439276e1ad8caddde35e788ab69852f63f2;hpb=238a6a36482b3cf82d1f984f0bdd7d296a2f4ba1;p=poolifier.git diff --git a/docs/interfaces/IWorker.html b/docs/interfaces/IWorker.html index b9e37439..d8cef72b 100644 --- a/docs/interfaces/IWorker.html +++ b/docs/interfaces/IWorker.html @@ -1,21 +1,126 @@ -IWorker | poolifier - v3.1.12

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