Skip to content

[6.2][Concurrency] Add Hashable conformance to Async(Throwing)Stream.Continuation #81064

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 3 commits into from
Apr 25, 2025

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Apr 24, 2025

Description: Adds hashable conformance and was approved in SE over here https://forums.swift.org/t/accepted-se-0468-hashable-conformance-for-async-throwing-stream-continuation/79116

Scope/Impact: Adds a Hashable conformance to AsyncStream.Continuation
Risk: Low, adding a conformance
Testing: CI testing
Reviewed by: @ktoso // PR on behalf of @nickolas-pohilets

Original PR: https://github.com/swiftlang/swift/pull/79457/files
Radar: rdar://149914179

@ktoso ktoso requested a review from a team as a code owner April 24, 2025 04:21
@ktoso
Copy link
Contributor Author

ktoso commented Apr 24, 2025

@swift-ci please test

@ktoso
Copy link
Contributor Author

ktoso commented Apr 24, 2025

@swift-ci please test macOS

@ktoso
Copy link
Contributor Author

ktoso commented Apr 24, 2025

@swift-ci please test source compatibility

@ktoso
Copy link
Contributor Author

ktoso commented Apr 24, 2025

@swift-ci please test macOS

2 similar comments
@ktoso
Copy link
Contributor Author

ktoso commented Apr 24, 2025

@swift-ci please test macOS

@ktoso
Copy link
Contributor Author

ktoso commented Apr 24, 2025

@swift-ci please test macOS

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

LGTM, we can do the @inlinable bit in a follow-up

@@ -475,6 +475,22 @@ extension AsyncStream: @unchecked Sendable where Element: Sendable { }
@available(SwiftStdlib 5.1, *)
extension AsyncStream.Continuation.YieldResult: Sendable where Element: Sendable { }

@available(SwiftStdlib 6.2, *)
extension AsyncStream.Continuation: Hashable {
@available(SwiftStdlib 6.2, *)
Copy link
Member

Choose a reason for hiding this comment

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

Should these all be @inlinable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@available(SwiftStdlib 6.2, *)
extension AsyncThrowingStream.Continuation: Hashable {
@available(SwiftStdlib 6.2, *)
public func hash(into hasher: inout Hasher) {
Copy link
Member

Choose a reason for hiding this comment

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

Same question here

@DougGregor DougGregor merged commit cbcaf5e into swiftlang:release/6.2 Apr 25, 2025
7 checks passed
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