-
Notifications
You must be signed in to change notification settings - Fork 45
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
Remove scheduler.yield() parameters #100
Conversation
By default, scheduler.yield() continuations inherit the priority and abort signal from the current task, but this behavior can be overridden by providing a signal or priority option. But it's not clear if this is necessary, and there are questions around the expectations of subsequent continuations (see WICG#96). To simplify the API, for now we're removing the yield() parameters, instead always using the inherited state. We can revisit this as use cases arise.
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.
Change is fine, but will repeat the question from other code review, here:
Is it still possible for "inherit" part of the scheduling options via the postTask API? Should it be?
I don't mind that you cannot control changes via yield() since I don't think you need continuation semantics if you are making changes to priority/signal. But it seems very likely useful to be able to only change one part of the options at a time-- and especially the ability to change priority without changing signal.
An alternative option would be for the developer to just keep a reference to the signal
-- or if there was an API to expose a reference to the current signal.
Then, rather than adding the option to "inherit", you would just pass the same reference?
By default, scheduler.yield() continuations inherit the priority and abort signal from the current task, but this behavior can be overridden by providing a signal or priority option. But it's not clear if this is necessary, and there are questions around the expectations of subsequent continuations (see WICG/scheduling-apis#96). So to simplify the API and prevent shipping behavior we might regret, we're removing the yield() parameters. If control over a continuation's priority/abort is needed, a new task can be scheduled using postTask(). We plan to reevaluate this as the API rolls out and developers start using it in more complex ways. Related PR: WICG/scheduling-apis#100. Bug: 40633887 Change-Id: I5e23c9c8cf950cec795cddafd27c962b71eea5f7
Currently not without passing around a signal/priority. I think we could revisit |
By default, scheduler.yield() continuations inherit the priority and abort signal from the current task, but this behavior can be overridden by providing a signal or priority option. But it's not clear if this is necessary, and there are questions around the expectations of subsequent continuations (see WICG/scheduling-apis#96). So to simplify the API and prevent shipping behavior we might regret, we're removing the yield() parameters. If control over a continuation's priority/abort is needed, a new task can be scheduled using postTask(). We plan to reevaluate this as the API rolls out and developers start using it in more complex ways. Related PR: WICG/scheduling-apis#100. Bug: 40633887 Change-Id: I5e23c9c8cf950cec795cddafd27c962b71eea5f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5753325 Commit-Queue: Scott Haseley <[email protected]> Reviewed-by: Michal Mocny <[email protected]> Cr-Commit-Position: refs/heads/main@{#1338805}
By default, scheduler.yield() continuations inherit the priority and abort signal from the current task, but this behavior can be overridden by providing a signal or priority option. But it's not clear if this is necessary, and there are questions around the expectations of subsequent continuations (see WICG/scheduling-apis#96). So to simplify the API and prevent shipping behavior we might regret, we're removing the yield() parameters. If control over a continuation's priority/abort is needed, a new task can be scheduled using postTask(). We plan to reevaluate this as the API rolls out and developers start using it in more complex ways. Related PR: WICG/scheduling-apis#100. Bug: 40633887 Change-Id: I5e23c9c8cf950cec795cddafd27c962b71eea5f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5753325 Commit-Queue: Scott Haseley <[email protected]> Reviewed-by: Michal Mocny <[email protected]> Cr-Commit-Position: refs/heads/main@{#1338805}
By default, scheduler.yield() continuations inherit the priority and abort signal from the current task, but this behavior can be overridden by providing a signal or priority option. But it's not clear if this is necessary, and there are questions around the expectations of subsequent continuations (see WICG/scheduling-apis#96). So to simplify the API and prevent shipping behavior we might regret, we're removing the yield() parameters. If control over a continuation's priority/abort is needed, a new task can be scheduled using postTask(). We plan to reevaluate this as the API rolls out and developers start using it in more complex ways. Related PR: WICG/scheduling-apis#100. Bug: 40633887 Change-Id: I5e23c9c8cf950cec795cddafd27c962b71eea5f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5753325 Commit-Queue: Scott Haseley <[email protected]> Reviewed-by: Michal Mocny <[email protected]> Cr-Commit-Position: refs/heads/main@{#1338805}
…) parameters, a=testonly Automatic update from web-platform-tests Scheduling APIs: Remove scheduler.yield() parameters By default, scheduler.yield() continuations inherit the priority and abort signal from the current task, but this behavior can be overridden by providing a signal or priority option. But it's not clear if this is necessary, and there are questions around the expectations of subsequent continuations (see WICG/scheduling-apis#96). So to simplify the API and prevent shipping behavior we might regret, we're removing the yield() parameters. If control over a continuation's priority/abort is needed, a new task can be scheduled using postTask(). We plan to reevaluate this as the API rolls out and developers start using it in more complex ways. Related PR: WICG/scheduling-apis#100. Bug: 40633887 Change-Id: I5e23c9c8cf950cec795cddafd27c962b71eea5f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5753325 Commit-Queue: Scott Haseley <[email protected]> Reviewed-by: Michal Mocny <[email protected]> Cr-Commit-Position: refs/heads/main@{#1338805} -- wpt-commits: edcaaa246cdce621e114ef5bb963296457521bab wpt-pr: 47481
…) parameters, a=testonly Automatic update from web-platform-tests Scheduling APIs: Remove scheduler.yield() parameters By default, scheduler.yield() continuations inherit the priority and abort signal from the current task, but this behavior can be overridden by providing a signal or priority option. But it's not clear if this is necessary, and there are questions around the expectations of subsequent continuations (see WICG/scheduling-apis#96). So to simplify the API and prevent shipping behavior we might regret, we're removing the yield() parameters. If control over a continuation's priority/abort is needed, a new task can be scheduled using postTask(). We plan to reevaluate this as the API rolls out and developers start using it in more complex ways. Related PR: WICG/scheduling-apis#100. Bug: 40633887 Change-Id: I5e23c9c8cf950cec795cddafd27c962b71eea5f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5753325 Commit-Queue: Scott Haseley <[email protected]> Reviewed-by: Michal Mocny <[email protected]> Cr-Commit-Position: refs/heads/main@{#1338805} -- wpt-commits: edcaaa246cdce621e114ef5bb963296457521bab wpt-pr: 47481
By default, scheduler.yield() continuations inherit the priority and abort signal from the current task, but this behavior can be overridden by providing a signal or priority option. But it's not clear if this is necessary, and there are questions around the expectations of subsequent continuations (see #96).
To simplify the API, for now we're removing the yield() parameters, instead always using the inherited state. We can revisit this as use cases arise.
Preview | Diff