Skip to content

Commit 9783071

Browse files
authored
[5.9] Mark DispatchTimeInterval as Sendable
This is an `enum` with associated values of `Int` type that are all `Sendable`, so should be safe mark the whole `enum` as such. This change is low to no risk for 5.9 as it's additive and doesn't touch any other types or functions. Resolves #787.
1 parent e7c4416 commit 9783071

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/swift/Time.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ private func toInt64Clamped(_ value: Double) -> Int64 {
165165
/// let t1 = DispatchTimeInterval.seconds(Int.max)
166166
/// let t2 = DispatchTimeInterval.milliseconds(Int.max)
167167
/// let result = t1 == t2 // true
168-
public enum DispatchTimeInterval: Equatable {
168+
public enum DispatchTimeInterval: Equatable, Sendable {
169169
case seconds(Int)
170170
case milliseconds(Int)
171171
case microseconds(Int)

0 commit comments

Comments
 (0)