Options
All
  • Public
  • Public/Protected
  • All
Menu

Worker Thread Endpoint in the UI-Thread. Implements the communication with the {@link IWorkerSlave} in the worker thread.

Hierarchy

  • DefaultWorkerThread

Implements

Index

Constructors

constructor

Properties

Private communicationChannel

Private functionLookupTable

functionLookupTable: DynamicFunctionRegistry

id

id: number = ++workerThreadId

Unique id of this worker thread

state

state: WorkerThreadState = new WorkerThreadState("default")

The current state of the worker thread

Private stopped

stopped: boolean = false

Methods

initialize

  • initialize(): void

Private onError

  • onError(event: any): void

Private onWorkerMessage

run

  • Executes the given task on the worker. Requires that the worker thread has been initialized

    Parameters

    • task: ITaskDefinition

      the task to execute

    • callback: function

      the callback to invoke when the task has completed (successful or not)

        • (error: any, result: any): void
        • Parameters

          • error: any
          • result: any

          Returns void

    Returns void

stop

  • stop(): void

toString

  • toString(): string

Generated using TypeDoc