MessagePort 类
- 继承自: <EventEmitter>
worker.MessagePort
类的实例代表异步双向通信通道的一端。
它可以用来在不同的 Worker
之间传输结构化的数据、内存区域和其他 MessagePort
- Extends: <EventEmitter>
Instances of the worker.MessagePort
class represent one end of an
asynchronous, two-way communications channel. It can be used to transfer
structured data, memory regions and other MessagePort
s between different
Worker
s.
With the exception of MessagePort
s being EventEmitter
s rather
than EventTarget
s, this implementation matches browser MessagePort
s.