4 ms·
I would be concerned about terminating an isolate on timeout, couldn't it be holding mutexes when you terminate it?
by kevingadd 3y ago
I would be concerned about terminating an isolate on timeout, couldn't it be holding mutexes when you terminate it?
- jhgg 3y agoV8 isolate termination is more akin to throwing an uncatchable exception, versus killing a thread abruptly. When you ask v8 to terminate an isolate, it does take some time for it to terminate depending on what code is running.
- silverlyra 3y agoIf you use SharedArrayBuffers in worker threads, use Atomics.wait to block, and then terminate the worker which would've called Atomics.notify – yes, if no timeout is used on the notify. But I don't know of any other way this would happen.