Skip to content

Commit 29ebbaa

Browse files
authored
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. Resolves #787.
1 parent a5167e2 commit 29ebbaa

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)