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

Add TaskSignal.any() #72

Merged
merged 10 commits into from
May 17, 2023
Merged

Add TaskSignal.any() #72

merged 10 commits into from
May 17, 2023

Conversation

shaseley
Copy link
Collaborator

@shaseley shaseley commented Apr 4, 2023

Specialization of AbortSignal.any() for TaskSignal.any(). It supports creating a composite signal with multiple abort sources and either a fixed priority or single priority source. The spec is similar to AbortSignal.any() and uses the internal constructor for the abort aspect.

Tests: https://github.com/web-platform-tests/wpt/tree/master/scheduler (task-signal-any*).


Preview | Diff

This adds TaskSignal.any(), which builds off of the algorithms being
added for AbortSignal.any(). Unlike the abort component, each composite
TaskSignal can have only one parent (for priority). This does a similar
optimization in that dependent signals are put on non-composite nodes.
@shaseley shaseley marked this pull request as ready for review April 4, 2023 23:51
@shaseley
Copy link
Collaborator Author

@domenic would you mind reviewing this too? It mirrors the AbortSignal.any(), with a few modifications to the potential of fixed priority signals. Thank you!

@shaseley shaseley requested a review from domenic May 10, 2023 23:52
Copy link
Collaborator

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits

spec/controlling-tasks.md Outdated Show resolved Hide resolved
spec/controlling-tasks.md Outdated Show resolved Hide resolved
spec/scheduling-tasks.md Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@shaseley shaseley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

spec/controlling-tasks.md Outdated Show resolved Hide resolved
spec/controlling-tasks.md Outdated Show resolved Hide resolved
spec/scheduling-tasks.md Outdated Show resolved Hide resolved
@shaseley shaseley merged commit e1ae615 into WICG:main May 17, 2023
@shaseley shaseley deleted the task-signal-any branch March 25, 2024 22:58
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

Successfully merging this pull request may close these issues.

2 participants