-
Notifications
You must be signed in to change notification settings - Fork 53
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
Task queueing #393
Comments
What would go wrong if we defined an HTML-level version of https://webidl.spec.whatwg.org/#resolve that checked for being [=in parallel=] and called https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task on the promise's relevant global? |
I like that idea. I think it would work. Oftentimes though it's not just resolving that needs to happen, but also other state updates. But perhaps it can take an optional list of steps for that. Something like "queue a task and resolve". cc @domenic (In theory I think the global can have been GC'd, but that's an existing problem.) |
This seems like unnecessary magic to me. And it's missing a task source; you need to pick one. |
I was assuming it would still take a task source, but instead of a global it would take a promise it would resolve at the end. But yeah, maybe it's a bit much. Also if you need to create the value to resolve with you'd also have to do that as part of the task, so... |
Yeah. I generally prefer to have the separate threads have clear distinct indentation levels, so you can tell when messages are being passed across such boundaries... |
You used "queue a task" to resolve this which is kinda deprecated. |
Ok, no problem. Will fix next week. |
Ok, I just realized that we now have a mismatch between the permission store and the eventing model. Updating the permission store should be causing queue global tasks to fire "change" events across the relevant navigables and workers. Also, web driver part of the spec should just be updating the permissions store, not managing its own tasks. |
@marcoscaceres want to file a new issue for that? |
You cannot resolve promises while in parallel. This is unfortunately somewhat common (and broken) copypasta. You need to queue a task ideally one of the newer queue a task algorithms that takes a global and such.
The text was updated successfully, but these errors were encountered: