Skip to content

Async.call method to convert completion-block call to async#1969

Merged
NachoSoto merged 1 commit into
mainfrom
async-call-method
Oct 10, 2022
Merged

Async.call method to convert completion-block call to async#1969
NachoSoto merged 1 commit into
mainfrom
async-call-method

Conversation

@NachoSoto

Copy link
Copy Markdown
Contributor

This simplifies calling completion-block APIs as async. The opposite of what #1943 introduced.

@NachoSoto NachoSoto requested a review from a team October 7, 2022 19:35
Comment on lines +63 to +66
@Sendable
func complete(_ result: Result<Value, Error>) {
continuation.resume(with: result)
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Without this intermediate func it doesn't compile before Xcode 14.1.

@NachoSoto NachoSoto merged commit b981e0f into main Oct 10, 2022
@NachoSoto NachoSoto deleted the async-call-method branch October 10, 2022 15:36
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