Stops the run and releases all the resources.
Stops the run and releases all the resources.
This must be called to ensure the run's resources are released.
Whether or not this makes the run fail or not is up to the implementation. However, in the following cases, calling close may not fail the run:
Idempotent, async, nothrow.
A Future that completes if the run completes.
A Future that completes if the run completes.
The future is failed if the run fails.
Note that a JSRun is not required to ever terminate on it's own. That means even if all code is executed and the event loop is empty, the run may continue to run. As a consequence, it is *not* correct to rely on termination of a JSRun without any external means of stopping it (i.e. calling close).
Sends a message to the JS end.
Sends a message to the JS end.
Async, nothrow. See JSEnv#startWithCom for expected message delivery guarantees.
A JSRun that has a communication channel to the running JS code.