object workerThreadsMod
- Source
- workerThreadsMod.scala
- Alphabetic
- By Inheritance
- workerThreadsMod
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class BroadcastChannel extends Object with StObject with RefCounted
See https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel
See https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel
- Annotations
- @JSType() @JSImport("worker_threads", "BroadcastChannel") @native()
- class MessageChannel extends Object with StObject
- Annotations
- @JSType() @JSImport("worker_threads", "MessageChannel") @native()
- class MessagePort extends Object with StObject with _TransferListItem
- Annotations
- @JSType() @JSImport("worker_threads", "MessagePort") @native()
- trait ResourceLimits_ extends Object with StObject
- Annotations
- @JSType() @native()
- type Serializable = |[|[|[|[java.lang.String, Object], Double], Boolean], BigInt]
- type TransferListItem = |[_TransferListItem, ArrayBuffer]
- class Worker extends Object with StObject
- Annotations
- @JSType() @JSImport("worker_threads", "Worker") @native()
- trait WorkerOptions extends Object with StObject
- Annotations
- @JSType() @native()
- trait WorkerPerformance extends Object with StObject
- Annotations
- @JSType() @native()
- trait _TransferListItem extends Object with StObject
- Annotations
- @JSType()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val SHARE_ENV: Symbol
- Annotations
- @JSImport("worker_threads", "SHARE_ENV") @native()
- val ^: Any
- Annotations
- @JSImport("worker_threads", JSImport.Namespace) @native()
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def getEnvironmentData(key: Serializable): Serializable
- key
Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
- Annotations
- @inline()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val isMainThread: Boolean
- Annotations
- @JSImport("worker_threads", "isMainThread") @native()
- def markAsUntransferable(object: Object): Unit
Mark an object as not transferable.
Mark an object as not transferable. If
objectoccurs in the transfer list of aport.postMessage()call, it will be ignored.In particular, this makes sense for objects that can be cloned, rather than transferred, and which are used by other objects on the sending side. For example, Node.js marks the
ArrayBuffers it uses for its Buffer pool with this.This operation cannot be undone.
- Annotations
- @inline()
- def moveMessagePortToContext(port: MessagePort, context: Context): MessagePort
Transfer a
MessagePortto a differentvmContext.Transfer a
MessagePortto a differentvmContext. The originalportobject will be rendered unusable, and the returnedMessagePortinstance will take its place.The returned
MessagePortwill be an object in the target context, and will inherit from its globalObjectclass. Objects passed to theport.onmessage()listener will also be created in the target context and inherit from its globalObjectclass.However, the created
MessagePortwill no longer inherit fromEventEmitter, and onlyport.onmessage()can be used to receive events using it.- Annotations
- @inline()
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- val parentPort: |[Null, MessagePort]
- Annotations
- @JSImport("worker_threads", "parentPort") @native()
- def receiveMessageOnPort(port: MessagePort): UndefOr[Message]
Receive a single message from a given
MessagePort.Receive a single message from a given
MessagePort. If no message is available,undefinedis returned, otherwise an object with a singlemessageproperty that contains the message payload, corresponding to the oldest message in theMessagePort’s queue.- Annotations
- @inline()
- val resourceLimits: ResourceLimits_
- Annotations
- @JSImport("worker_threads", "resourceLimits") @native()
- def setEnvironmentData(key: Serializable, value: Serializable): Unit
- key
Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
- value
Any arbitrary, cloneable JavaScript value that will be cloned and passed automatically to all new
Workerinstances. Ifvalueis passed asundefined, any previously set value for thekeywill be deleted.
- Annotations
- @inline()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val threadId: Double
- Annotations
- @JSImport("worker_threads", "threadId") @native()
- def toString(): java.lang.String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- val workerData: Any
- Annotations
- @JSImport("worker_threads", "workerData") @native()
- object ResourceLimits_
- object WorkerOptions
- object WorkerPerformance
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated