Package-level declarations
Types
Properties
Functions
Within a worker thread, worker.getEnvironmentData()
returns a clone of data passed to the spawning thread's worker.setEnvironmentData()
. Every new Worker
receives its own copy of the environment data automatically.
Mark an object as not transferable. If object
occurs in the transfer list of a port.postMessage()
call, it is ignored.
Transfer a MessagePort
to a different vm
Context. The original port
object is rendered unusable, and the returned MessagePort
instance takes its place.
Receive a single message from a given MessagePort
. If no message is available,undefined
is returned, otherwise an object with a single message
property that contains the message payload, corresponding to the oldest message in the MessagePort
's queue.
The worker.setEnvironmentData()
API sets the content of worker.getEnvironmentData()
in the current thread and all new Worker
instances spawned from the current context.