Close the communication channel.
Close the communication channel. Allows the VM to terminate if it is still waiting for callback. The JVM side **must** call close in order to be able to expect termination of the VM.
Calling stop on a [ComJSRunner]] automatically closes the channel.
A future that completes when the associated run has terminated.
A future that completes when the associated run has terminated.
Blocks until a message is received and returns it.
Blocks until a message is received and returns it.
ComClosedException
if the channel is closed before a message
is received
scala.concurrent.TimeoutException
if the timeout expires
before a message is received and the channel is still open
Send a message to the JS VM.
Send a message to the JS VM. Throws if the message cannot be sent.
Start the associated run and returns a Future that completes when the run terminates.
Start the associated run and returns a Future that completes when the run terminates. The returned Future is equivalent to the one returned by future.
Await completion of the started Run for the duration specified by atMost.
Await completion of the started Run for the duration specified by atMost. Strictly equivalent to:
Await.result(future, atMost)
Await completion of the started Run.
Await completion of the started Run. Strictly equivalent to
Await.result(future, Duration.Inf)
Awaits completion of the started Run for the duration specified by atMost, or force it to stop.
Awaits completion of the started Run for the duration specified by atMost, or force it to stop.
If any exception is thrown while awaiting completion (including a
TimeoutException, forces the runner
to stop by calling stop()
before rethrowing the exception.
Strictly equivalent to:
try await(atMost) finally stop()
Checks whether this async runner is still running.
Checks whether this async runner is still running. Strictly equivalent to
!future.isCompleted
Blocks until a message is received and returns it.
Blocks until a message is received and returns it.
ComClosedException
if the channel is closed before a message
is received
Abort the associated run.
Abort the associated run. Also closes the communication channel.