Packages

class Worker extends Object with StObject

Annotations
@JSType() @JSImport("worker_threads", "Worker") @native()
Source
workerThreadsMod.scala
Linear Supertypes
StObject, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Worker
  2. StObject
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Worker(filename: java.lang.String, options: WorkerOptions)
  2. new Worker(filename: URL_, options: WorkerOptions)
  3. new Worker(filename: java.lang.String)

    filename

    The path to the Worker’s main script or module. Must be either an absolute path or a relative path (i.e. relative to the current working directory) starting with ./ or ../, or a WHATWG URL object using file: protocol. If options.eval is true, this is a string containing JavaScript code rather than a path.

  4. new Worker(filename: URL_)
  5. new Worker()
    Attributes
    protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addListener(event: Symbol, listener: Function1[Any, Unit]): Worker.this.type
  5. def addListener(event: java.lang.String, listener: Function1[Any, Unit]): Worker.this.type
  6. def addListener_error(event: error, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("addListener")
  7. def addListener_exit(event: exit, listener: Function1[Double, Unit]): Worker.this.type
    Annotations
    @JSName("addListener")
  8. def addListener_message(event: message, listener: Function1[Any, Unit]): Worker.this.type
    Annotations
    @JSName("addListener")
  9. def addListener_messageerror(event: messageerror, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("addListener")
  10. def addListener_online(event: online, listener: Function0[Unit]): Worker.this.type
    Annotations
    @JSName("addListener")
  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  13. def emit(event: Symbol, args: Any*): Boolean
  14. def emit(event: java.lang.String, args: Any*): Boolean
  15. def emit_error(event: error, err: Error): Boolean
    Annotations
    @JSName("emit")
  16. def emit_exit(event: exit, exitCode: Double): Boolean
    Annotations
    @JSName("emit")
  17. def emit_message(event: message, value: Any): Boolean
    Annotations
    @JSName("emit")
  18. def emit_messageerror(event: messageerror, error: Error): Boolean
    Annotations
    @JSName("emit")
  19. def emit_online(event: online): Boolean
    Annotations
    @JSName("emit")
  20. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  22. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  23. def getHeapSnapshot(): Promise[Readable]

    Returns a readable stream for a V8 snapshot of the current state of the Worker.

    Returns a readable stream for a V8 snapshot of the current state of the Worker. See v8.getHeapSnapshot() for more details.

    If the Worker thread is no longer running, which may occur before the 'exit' event is emitted, the returned Promise will be rejected immediately with an ERR_WORKER_NOT_RUNNING error

  24. def hasOwnProperty(v: scala.Predef.String): Boolean
    Definition Classes
    Object
  25. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  31. def off(event: Symbol, listener: Function1[Any, Unit]): Worker.this.type
  32. def off(event: java.lang.String, listener: Function1[Any, Unit]): Worker.this.type
  33. def off_error(event: error, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("off")
  34. def off_exit(event: exit, listener: Function1[Double, Unit]): Worker.this.type
    Annotations
    @JSName("off")
  35. def off_message(event: message, listener: Function1[Any, Unit]): Worker.this.type
    Annotations
    @JSName("off")
  36. def off_messageerror(event: messageerror, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("off")
  37. def off_online(event: online, listener: Function0[Unit]): Worker.this.type
    Annotations
    @JSName("off")
  38. def on(event: Symbol, listener: Function1[Any, Unit]): Worker.this.type
  39. def on(event: java.lang.String, listener: Function1[Any, Unit]): Worker.this.type
  40. def on_error(event: error, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("on")
  41. def on_exit(event: exit, listener: Function1[Double, Unit]): Worker.this.type
    Annotations
    @JSName("on")
  42. def on_message(event: message, listener: Function1[Any, Unit]): Worker.this.type
    Annotations
    @JSName("on")
  43. def on_messageerror(event: messageerror, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("on")
  44. def on_online(event: online, listener: Function0[Unit]): Worker.this.type
    Annotations
    @JSName("on")
  45. def once(event: Symbol, listener: Function1[Any, Unit]): Worker.this.type
  46. def once(event: java.lang.String, listener: Function1[Any, Unit]): Worker.this.type
  47. def once_error(event: error, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("once")
  48. def once_exit(event: exit, listener: Function1[Double, Unit]): Worker.this.type
    Annotations
    @JSName("once")
  49. def once_message(event: message, listener: Function1[Any, Unit]): Worker.this.type
    Annotations
    @JSName("once")
  50. def once_messageerror(event: messageerror, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("once")
  51. def once_online(event: online, listener: Function0[Unit]): Worker.this.type
    Annotations
    @JSName("once")
  52. val performance: WorkerPerformance
  53. def postMessage(value: Any, transferList: Array[TransferListItem]): Unit
  54. def postMessage(value: Any): Unit
  55. def prependListener(event: Symbol, listener: Function1[Any, Unit]): Worker.this.type
  56. def prependListener(event: java.lang.String, listener: Function1[Any, Unit]): Worker.this.type
  57. def prependListener_error(event: error, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("prependListener")
  58. def prependListener_exit(event: exit, listener: Function1[Double, Unit]): Worker.this.type
    Annotations
    @JSName("prependListener")
  59. def prependListener_message(event: message, listener: Function1[Any, Unit]): Worker.this.type
    Annotations
    @JSName("prependListener")
  60. def prependListener_messageerror(event: messageerror, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("prependListener")
  61. def prependListener_online(event: online, listener: Function0[Unit]): Worker.this.type
    Annotations
    @JSName("prependListener")
  62. def prependOnceListener(event: Symbol, listener: Function1[Any, Unit]): Worker.this.type
  63. def prependOnceListener(event: java.lang.String, listener: Function1[Any, Unit]): Worker.this.type
  64. def prependOnceListener_error(event: error, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("prependOnceListener")
  65. def prependOnceListener_exit(event: exit, listener: Function1[Double, Unit]): Worker.this.type
    Annotations
    @JSName("prependOnceListener")
  66. def prependOnceListener_message(event: message, listener: Function1[Any, Unit]): Worker.this.type
    Annotations
    @JSName("prependOnceListener")
  67. def prependOnceListener_messageerror(event: messageerror, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("prependOnceListener")
  68. def prependOnceListener_online(event: online, listener: Function0[Unit]): Worker.this.type
    Annotations
    @JSName("prependOnceListener")
  69. def propertyIsEnumerable(v: scala.Predef.String): Boolean
    Definition Classes
    Object
  70. def ref(): Unit
  71. def removeListener(event: Symbol, listener: Function1[Any, Unit]): Worker.this.type
  72. def removeListener(event: java.lang.String, listener: Function1[Any, Unit]): Worker.this.type
  73. def removeListener_error(event: error, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("removeListener")
  74. def removeListener_exit(event: exit, listener: Function1[Double, Unit]): Worker.this.type
    Annotations
    @JSName("removeListener")
  75. def removeListener_message(event: message, listener: Function1[Any, Unit]): Worker.this.type
    Annotations
    @JSName("removeListener")
  76. def removeListener_messageerror(event: messageerror, listener: Function1[Error, Unit]): Worker.this.type
    Annotations
    @JSName("removeListener")
  77. def removeListener_online(event: online, listener: Function0[Unit]): Worker.this.type
    Annotations
    @JSName("removeListener")
  78. val resourceLimits: UndefOr[ResourceLimits_]
  79. val stderr: Readable
  80. val stdin: |[Writable, Null]
  81. val stdout: Readable
  82. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  83. def terminate(): Promise[Double]

    Stop all JavaScript execution in the worker thread as soon as possible.

    Stop all JavaScript execution in the worker thread as soon as possible. Returns a Promise for the exit code that is fulfilled when the exit event is emitted.

  84. val threadId: Double
  85. def toLocaleString(): scala.Predef.String
    Definition Classes
    Object
  86. def toString(): java.lang.String
    Definition Classes
    AnyRef → Any
  87. def unref(): Unit
  88. def valueOf(): Any
    Definition Classes
    Object
  89. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  90. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  91. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from StObject

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped