-
Notifications
You must be signed in to change notification settings - Fork 321
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
platform: pump_message_loop, run_idle_tasks, GLOBAL_PLATFORM #706
Conversation
@inteon very nice! The code looks mostly good to me, however a segfault happens in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request, @inteon.
I like the general thrust but I have mixed feelings about bypassing V8's public API and using the internal DefaultPlatform
directly.
I assume you're doing that so you can use placement new but is that really necessary? Is the current UniquePtr<Platform>
approach not workable?
@bnoordhuis @piscisaureus @bartlomieju The main challenge I encountered implementing this PR, is the For that reason, I'm using @piscisaureus I think the reference counter for the Arc increases when calling |
@inteon Would |
For a I'll retry that solution, because ofc this solution also adds a lot of challenges. |
Just finished creating a solution based on |
@inteon nice work! This looks much better to me. I'll defer to review from @bnoordhuis and @piscisaureus |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @inteon. Ideally, the test wouldn't use natives syntax (not stable across V8 releases) but if this is the only reliable way to test then so be it.
Co-authored-by: Ben Noordhuis <[email protected]>
Added
pump_message_loop
andrun_idle_tasks
tov8::Platform
.The
GLOBAL_PLATFORM
now manages the active platform.