Options
All
  • Public
  • Public/Protected
  • All
Menu

A client-side class responsible for managing a set of web workers. This interface is accessed as a singleton instance via game.workers.

see

Game#workers

Hierarchy

  • Map
    • WorkerManager

Index

Constructors

Methods

  • createWorker(name: string, config?: any): Promise<AsyncWorker>
  • Create a new named Worker.

    Parameters

    • name: string

      The named Worker to create

    • config: any = {}

    Returns Promise<AsyncWorker>

    The created AsyncWorker which is ready to accept tasks

  • retireWorker(name: string): void
  • Retire a current Worker, terminating it immediately.

    see

    Worker#terminate

    Parameters

    • name: string

      The named worker to terminate

    Returns void

Properties

WORKER_TASK_ACTIONS: Readonly<{ INIT: "init"; LOAD: "load"; EXECUTE: "execute" }> = ...

Supported worker task actions