Revert "[Concurrency] Hashable funcs should be inlinable for AsyncStream"

This reverts commit 06bb7183f4.
This commit is contained in:
Doug Gregor
2025-05-05 10:43:11 -07:00
parent 22efac8e12
commit f358c1e6b7
3 changed files with 0 additions and 10 deletions

View File

@@ -177,7 +177,6 @@ public struct AsyncStream<Element> {
case bufferingNewest(Int)
}
@usableFromInline
let storage: _Storage
/// Resume the task awaiting the next iteration point by having it return
@@ -478,17 +477,14 @@ extension AsyncStream.Continuation.YieldResult: Sendable where Element: Sendable
@available(SwiftStdlib 6.2, *)
extension AsyncStream.Continuation: Hashable {
@inlinable
@available(SwiftStdlib 6.2, *)
public func hash(into hasher: inout Hasher) {
return hasher.combine(ObjectIdentifier(storage))
}
@inlinable
@available(SwiftStdlib 6.2, *)
public var hashValue: Int {
return _hashValue(for: self)
}
@inlinable
@available(SwiftStdlib 6.2, *)
public static func == (lhs: Self, rhs: Self) -> Bool {
return lhs.storage === rhs.storage

View File

@@ -55,7 +55,6 @@ func _unlock(_ ptr: UnsafeRawPointer)
@available(SwiftStdlib 5.1, *)
extension AsyncStream {
@safe
@usableFromInline
internal final class _Storage: @unchecked Sendable {
typealias TerminationHandler = @Sendable (Continuation.Termination) -> Void
@@ -282,7 +281,6 @@ extension AsyncStream {
@available(SwiftStdlib 5.1, *)
extension AsyncThrowingStream {
@safe
@usableFromInline
internal final class _Storage: @unchecked Sendable {
typealias TerminationHandler = @Sendable (Continuation.Termination) -> Void
enum Terminal {

View File

@@ -199,7 +199,6 @@ public struct AsyncThrowingStream<Element, Failure: Error> {
case bufferingNewest(Int)
}
@usableFromInline
let storage: _Storage
/// Resume the task awaiting the next iteration point by having it return
@@ -524,17 +523,14 @@ extension AsyncThrowingStream.Continuation.YieldResult: Sendable where Element:
@available(SwiftStdlib 6.2, *)
extension AsyncThrowingStream.Continuation: Hashable {
@inlinable
@available(SwiftStdlib 6.2, *)
public func hash(into hasher: inout Hasher) {
return hasher.combine(ObjectIdentifier(storage))
}
@inlinable
@available(SwiftStdlib 6.2, *)
public var hashValue: Int {
return _hashValue(for: self)
}
@inlinable
@available(SwiftStdlib 6.2, *)
public static func == (lhs: Self, rhs: Self) -> Bool {
return lhs.storage === rhs.storage