Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Class WorkerManager

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

    Hierarchy

    • Map
      • WorkerManager
    Index

    Properties

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

    Supported worker task actions

    Methods

    • Create a new named Worker.

      Parameters

      • name: string

        The named Worker to create

      • Optionalconfig: object = {}

        Worker configuration parameters passed to the AsyncWorker constructor

      Returns Promise<AsyncWorker>

      The created AsyncWorker which is ready to accept tasks

    • Retire a current Worker, terminating it immediately.

      Parameters

      • name: string

        The named worker to terminate

      Returns void

      Worker#terminate