WorkerProxy<T> Type
WorkerProxy = WorkerInterface<T> & { isTerminated: boolean, terminate: }
A proxy for a web worker that provides the operations specified by
the methods of T
.
To use a worker proxy, define a worker script that provides registerWorker with an implementation of T
, and obtain a proxy
via createWorkerProxy on the main thread. The proxy can then be used to asynchronously invoke methods of T
on the worker.
See this article for more details and examples.
Defined in
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.