forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
@_unsafeInheritExecutor
forms of with*Continuation from `@_unsa…
…feInheritExecutor` functions The move from `@_unsafeInheritExecutor` to `#isolation` for the with*Continuation breaks code that is using `@_unsafeInheritExecutor` and calling these APIs. This originally caused silent breakage (which manifest as runtime crashes), and is now detected by the compiler as an error. However, despite `@_unsafeInheritExecutor` being an unsafe, not-intended-to-be-user-facing feature, it is indeed being used, along with these APIs. Introduce _unsafeInheritExecutor_-prefixed versions of the `with*Continuation` and `withTaskCancellationHandler` APIs into the _Concurrency library that use `@_unsafeInheritExecutor`. Then, teach the type checker to swap in these _unsafeInheritExecutor_-prefixed versions in lieu of the originals when they are called from an `@_unsafeInheritExecutor` function. This allows existing code using `@_unsafeInheritExecutor` with these APIs to continue working as it has before, albeit with a warning that `@_unsafeInheritExecutor` has been removed. Fixes rdar://131151376.
- Loading branch information
1 parent
45d4d97
commit a2b2324
Showing
8 changed files
with
149 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters