Constructs a worker protocol for asynchronous processing off the main runtime thread.
The named parameters.
The optional name to give to the protocol.
Optionaloptions?: CWorkerOptionsOptions for further configuration of the worker. Defaults to a "module" type.
The receive handler for data and state changes.
The URL associated with the worker thread.
A log identification.
Sends a message, which can be of any kind of Object, to the background worker for processing based on how it was setup to be processed.
Optionaldata: any
The data to post. The data is serialized using the structured clone algorithm. This means you can pass a broad variety of data objects safely to the background for processing without having to serialize them yourself.
Terminates the given protocol.
Identifies the type of protocol.
Staticcpu_Identifies the number of background threads are available to the worker.
Constructs a dedicated background worker off the JavaScript runtime main thread via the async_worker function.