@lacrypta/nomad v0.0.0 / VMWorker
An instance of an environment-agnostic worker.
kill(): this
Stop the worker instance immediately.
this
this
, for chaining.
listen(messageCallback: MessageCallback, errorCallback: ErrorCallback): this
Set the given callbacks as handlers for message / error.
• messageCallback: MessageCallback
Callback to use for message handling.
• errorCallback: ErrorCallback
Callback to use for message errors.
this
this
, for chaining.
shout(data: object): this
Send the given data to the VMWorker.
[!warning] The given
data
object MUST be serializable viaJSON.serialize
.
• data: object
object to send to the VMWorker.
this
this
, for chaining.