-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Concurrency] Simplify the type story for Continuation
by eliminating Throwing
variants
#35868
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
Conversation
Continuation
by eliminating Throwing
variants
A previous iteration of this code included a |
@swift-ci Please smoke test |
@swift-ci Please smoke test |
1 similar comment
@swift-ci Please smoke test |
@swift-ci Please test |
Build failed |
Build failed |
… Throwing variants The goal of doing this is to reduce the amount of boilerplate and repeated code w.r.t. Continuation. Having just added `resume()` in four places, I got the sense that there was a lot of common code that was being duplicated. I removed the Throwing variants of these types (they can be expressed as Continuation<T, E:Error> instead of ThrowingContinuation<E>) and I broke out a significant amount of common code between CheckedContinuation and UnsafeContinuation into an implementation-only protocol to avoid repeating it. D.R.Y. This change resolves rdar://74154769.
Squashed changes. @swift-ci please test |
Build failed |
@swift-ci Please clean test macOS platform |
Build failed |
@swift-ci please test macOS |
Build failed |
@swift-ci please clean test |
Build failed |
@swift-ci please clean test |
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.
Looks good, thanks!
The goal of doing this is to reduce the amount of boilerplate and repeated code w.r.t. Continuation. Having just added
resume()
in four places, I got the sense that there was a lot of common code that was being duplicated. D.R.Y.This change resolves rdar://74154769.