For long-running go callbacks that don't access JS at all, it is
useful to unlock the isolate and allow other threads to use it
while the callback is running. Added an Unlocked() function to
the context to facilitate this.
Right now the Terminate() function exists (IMO incorrectly) on
the context level even though the function will terminate any
context that is currently running on the isolate. Unfortunately
there doesn't appear to be an easy way to get V8 to terminate
only a specific context. So added a TODO to move the function.
Because of this limitation, it would be nice to know if a context
operation was spuriously terminated because another operation on
another context in the isolate ran too long and timed out. So
added a bunch of piping to return TerminatedError from a bunch
of places.
For long-running go callbacks that don't access JS at all, it is useful to unlock the isolate and allow other threads to use it while the callback is running. Added an Unlocked() function to the context to facilitate this.
Right now the Terminate() function exists (IMO incorrectly) on the context level even though the function will terminate any context that is currently running on the isolate. Unfortunately there doesn't appear to be an easy way to get V8 to terminate only a specific context. So added a TODO to move the function.
Because of this limitation, it would be nice to know if a context operation was spuriously terminated because another operation on another context in the isolate ran too long and timed out. So added a bunch of piping to return TerminatedError from a bunch of places.