mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Revert "[Concurrency] Hashable funcs should be inlinable for AsyncStream"
This reverts commit 06bb7183f4.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user