Skip to content

[Refactoring] Add @completionHandlerAsync to sync function #37417

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

Merged
merged 1 commit into from
May 14, 2021

Conversation

bnbarham
Copy link
Contributor

When adding an async alternative, add the @completionHandlerAsync
attribute to the sync function. Check for this attribute in addition to
the name check, ie. convert a call if the callee has either
@completionHandlerAsync or a name that is completion-handler-like name.

The addition of the attribute is currently gated behind the experimental
concurrency flag.

Resolves rdar://77486504

@bnbarham bnbarham requested review from ahoppen and hamishknight May 14, 2021 04:46
@bnbarham
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Just one nitpick in refactor-check-compiles, otherwise LGTM.

When adding an async alternative, add the @completionHandlerAsync
attribute to the sync function. Check for this attribute in addition to
the name check, ie. convert a call if the callee has either
@completionHandlerAsync or a name that is completion-handler-like name.

The addition of the attribute is currently gated behind the experimental
concurrency flag.

Resolves rdar://77486504
@bnbarham bnbarham force-pushed the add-completionhandler-attribute branch from bfcbbd3 to 762337c Compare May 14, 2021 10:19
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@ahoppen ahoppen merged commit b0bade6 into swiftlang:main May 14, 2021
@bnbarham bnbarham deleted the add-completionhandler-attribute branch May 14, 2021 22:54
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.

3 participants