Optional
idOptional
interruptIf true, the worker will be terminated and restarted for each new stream value. This is useful to avoid executing extraneous work and ensures only the most rececent stream value is being processed.
Default: false
Optional
maxMax. number of worker instances to use. Only useful if interrupt
is disabled. If more than one worker is used, incoming stream values will be assigned in a round robin manner and result value ordering will be non-deterministic. Workers will be instantiated on demand.
Default: 1
Tunnelled worker instance, source blob or script URL. If interrupt
is enabled, the worker MUST be given as blob or URL.
Optional
terminateIf given and greater than zero, all workers will be terminated after given period (in millis) after the parent stream is done.
Default: 1000
Optional
transferablesOptional function to extract transferables from incoming stream values, e.g. ArrayBuffers. See: https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage
Generated using TypeDoc
Optional subscription ID to use.