-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Tie event loops to agents #4214
Conversation
I'm looking for feedback on approach and how to tackle specific things I called out in comments. |
Hmm, I'm worried this might not align well with our desire to give implementations more freedom. Maybe what I'm worried about is more relevant for agent clusters, but I thought it was possible (and indeed likely, in many-tab situations) for multiple agents to share an event loop. |
Since that difference isn't observable, I think it's better for the design to aim for maximum concurrency. We could add a note, but it might get complicated given JavaScript's expectations around forward progress for agents. |
11c75f2
to
adc60d7
Compare
Thoughts so far:
|
I guess we could allow sharing, but it seems that would just make things more complicated, as it's not as simple as allowing any two agents to share, that won't work. Sharing it across origins is rather questionable given Spectre. Sharing it within an agent cluster is not allowed by JavaScript. Sharing it across browsing context groups would not allow for making background tabs use less CPU, but could be allowed if user agents don't care for that. Is that the one you want? |
Per https://freenode.logbot.info/whatwg/20190118#c1931283 it looks like we want to take a slightly different approach here. |
Event loops ought to be 1:1 with agents, let's make it so. Helps with #4198.
adc60d7
to
9339d99
Compare
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.
Great stuff, looking pretty close. I've tried to be concrete about there is left to do.
I carefully checked all outstanding feedback and I think I got it covered with the latest commit. |
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 with some remaining nits which I trust you to resolve. Thanks again for the patience.
Event loops ought to be 1:1 with agents, let's make it so.
Helps with #4198.
/browsers.html ( diff )
/canvas.html ( diff )
/history.html ( diff )
/structured-data.html ( diff )
/timers-and-user-prompts.html ( diff )
/web-messaging.html ( diff )
/webappapis.html ( diff )
/window-object.html ( diff )
/workers.html ( diff )