-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UncheckedSendable: AsyncSequence
(#44)
* `UncheckedSendable: AsyncSequence` Currently, a non-sendable sequence cannot be erased to `AsyncStream` using this library's initializers even if one takes care to traffic it through via `nonisolated(unsafe)`: ```swift nonisolated(unsafe) let nonSendable = nonSendable AsyncStream(nonSendable) // 🛑 ``` This conditional conformance acts as a workaround: ```swift AsyncStream(UncheckedSendable(nonSendable)) ``` Ideally folks can stop using our concrete async sequence eraser in favor of `any AsyncSequence<Element, Failure>`, but this requires a minimum deployment target of iOS 18, so it won't be an option for many people for some time. * Xcode 15 support * add deprecation * fix wasm * Update AsyncStream.swift * Update AsyncThrowingStream.swift --------- Co-authored-by: Brandon Williams <[email protected]>
- Loading branch information
1 parent
4fee5ec
commit e284ff5
Showing
4 changed files
with
66 additions
and
16 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