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

Concurrency: add missing Sendable requirements, conformances, and address other warnings #39062

Merged

Conversation

DougGregor
Copy link
Member

A few fixes to the concurrency library that address warnings:

  • Add Sendable constraint to MainActor.run and a few of the back-deployment shims.
  • Make _AsyncStreamCriticalStorage conform to Sendable (this is @unchecked because it's a class that handles its own locking).
  • Make _runAsyncMain take an @_unsafeSendable parameter. There's a compiler bug here still, which results in a spurious warning.
  • Switch the AsyncStream implementation over to withTaskCancellationHandler.
  • Make the unusable property wrapper subscript for task locals unavailable.

@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 3fc18f3 into swiftlang:main Aug 26, 2021
@DougGregor DougGregor deleted the concurrency-lib-sendable-part-deux branch August 26, 2021 21:27
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