Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Isolate::RunMicrotasks #914

Open
romgrk opened this issue May 25, 2021 · 4 comments
Open

Support Isolate::RunMicrotasks #914

romgrk opened this issue May 25, 2021 · 4 comments

Comments

@romgrk
Copy link
Contributor

romgrk commented May 25, 2021

Was merged with MicrotaskQueue::RunMicrotasks:

v8/v8@ba363c7

@addaleax
Copy link
Member

@romgrk What exactly are you looking for here? The change you linked is not an API change.

@romgrk
Copy link
Contributor Author

romgrk commented May 26, 2021

Wdym by not an API change? It was previously Isolate::RunMicrotasks, it's now Isolate::PerformMicrotaskCheckpoint. Something like Nan::RunMicrotasks() would be nice.

#if V8_MAJOR_VERSION >= 9
    Isolate::GetCurrent()->PerformMicrotaskCheckpoint();
#else
    Isolate::GetCurrent()->RunMicrotasks();
#endif

@addaleax
Copy link
Member

@romgrk Could it be that you’re thinking about a different V8 commit then? Only changes to include/ are relevant for Node.js addons.

That being said – Node.js addons should generally not run the microtask queue manually, because Node.js itself manages it. Do you have a specific use case in mind?

@romgrk
Copy link
Contributor Author

romgrk commented May 26, 2021

@romgrk Could it be that you’re thinking about a different V8 commit then? Only changes to include/ are relevant for Node.js addons.

Ok, not that's the commit I'm thinking about, not sure how you classify what goes in or not but I was under the impression that this was for anything that needs to be specialized for different V8 versions.

That being said – Node.js addons should generally not run the microtask queue manually, because Node.js itself manages it. Do you have a specific use case in mind?

I know, but my addon isn't like most of them :| I need to stop nodejs event loop to replace it with GTK's event loop and call uv_run from within it. Very unconventional and has bad implications for how things work, but there are no easy solutions to the root issue.

But anyway, this is quite small and I understand it's a very rare use-case, I can live with doing the check in my codebase, you can close if you don't plan to include it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants