-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 Priority Escalation APIs #2685
Conversation
Co-authored-by: Franz Busch <[email protected]>
cea9422
to
9b37040
Compare
9b37040
to
f0f83ec
Compare
} | ||
``` | ||
|
||
The above example showcases a common pattern: often an unchecked continuation is paired with a Task used to complete it. Around the suspension on the continuation, waiting for it to be resumed, developers often install a task cancellation handler in order to potentially break out of potentially unbounded waiting for a continuation to be resumed. Around the same suspension (marked with `HERE` in the snippet above), we might want to insert a task priority escalation handler in order to priority boost the task that is used to resume the continuation. This can be important for correctness and performance of such operations, so we should find a way to offer these libraries to participate in task priority handling. |
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.
nit:
often an unchecked continuation
there's a mix of checked & unchecked continuations in the above example. maybe drop the additional descriptor and just go with 'continuation'.
so we should find a way to offer these libraries [a mechanism] to participate in task priority handling.
Co-authored-by: Jamie <[email protected]>
This should be ready to go 👍 |
Proposal for impl over at: swiftlang/swift#78625