Function createBackgroundWorker

  • Parameters

    • opts: {
          postMessage: {
              (message: any, transfer: Transferable[]): void;
              (message: any, options?: StructuredSerializeOptions): void;
          };
          processor: Observable<IProcessor>;
          terminate: (() => void);
      }
      • postMessage: {
            (message: any, transfer: Transferable[]): void;
            (message: any, options?: StructuredSerializeOptions): void;
        }
          • (message: any, transfer: Transferable[]): void
          • Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned.

            Parameters

            • message: any
            • transfer: Transferable[]

            Returns void

          • (message: any, options?: StructuredSerializeOptions): void
          • Parameters

            • message: any
            • Optional options: StructuredSerializeOptions

            Returns void

      • processor: Observable<IProcessor>
      • terminate: (() => void)
          • (): void
          • Aborts worker's associated global environment.

            Returns void

    Returns {
        process: ((item: WorkerItem) => void);
    }

Generated using TypeDoc