I have attached to node with the program executing in the middle of a
while/busy loop.
I think I found what node is doing.
https://github.com/v8/v8/blob/96a039aab14b71069e88c4c04543e6bc9514a0d6/include/v8.h#L7969
void v8::Isolate::RequestInterrupt(InterruptCallback callback, void* data);
This
Going off topic now, but can you attach & break into node.js whilst it's in
a big blocking function?
Or can you only break if you've previously attached? (I've only done light,
very-async stuff in node)
In long-running funcs (well, accidental massive loops) in chrome I find I
struggle to
Hello,
I have the following code :
while (bson_iter_next())
{
const char* key = bson_iter_key();
if (!_paths.count(key))
{
_template->SetAccessor(
String::NewFromUtf8(isolate, key),
Yeah I can't make any assumptions or impose any requirements about what the
javascript to be executed will look like.
It must be possible since Node.js already does this for long running
JavaScript.
Thanks for the suggestions and quick responses
-Konrad
On Wednesday, November 14, 2018 at
The only way I could interrupt long runs of javascript, assuming you can't
break it yourself into asynchronous code (via promises/await, this is the
nicest approach IMO me), is adding a yield function to let the event loop
run (I have other multithread-y reasons for this too, but letting
I filed a bug for the slightly counter-intuitive behavior I mentioned:
https://bugs.chromium.org/p/v8/issues/detail?id=8455
Cheers,
Yang
On Wed, Nov 14, 2018 at 9:01 AM Yang Guo wrote:
> When you terminate execution in V8, we abort execution until the
> bottom-most call into V8. If you have
When you terminate execution in V8, we abort execution until the
bottom-most call into V8. If you have re-entries into V8, V8 always returns
empty results until the bottom-most call into V8. On the Blink side on the
stack of the re-entries, you can try to call into V8 before returning, but
that