Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/swift/Dispatch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CDispatch
/// dispatch_assert

@available(macOS 10.12, iOS 10.0, tvOS 10.0, watchOS 3.0, *)
public enum DispatchPredicate {
public enum DispatchPredicate : Sendable {
case onQueue(DispatchQueue)
case onQueueAsBarrier(DispatchQueue)
case notOnQueue(DispatchQueue)
Expand Down Expand Up @@ -46,7 +46,7 @@ public func dispatchPrecondition(condition: @autoclosure () -> DispatchPredicate

/// qos_class_t

public struct DispatchQoS : Equatable {
public struct DispatchQoS : Equatable, Sendable {
public let qosClass: QoSClass
public let relativePriority: Int

Expand All @@ -67,7 +67,7 @@ public struct DispatchQoS : Equatable {

public static let unspecified = DispatchQoS(qosClass: .unspecified, relativePriority: 0)

public enum QoSClass {
public enum QoSClass : Sendable {
@available(macOS 10.10, iOS 8.0, *)
case background

Expand Down Expand Up @@ -125,7 +125,7 @@ public func ==(a: DispatchQoS, b: DispatchQoS) -> Bool {

///

public enum DispatchTimeoutResult {
public enum DispatchTimeoutResult : Sendable {
static let KERN_OPERATION_TIMED_OUT:Int = 49
case success
case timedOut
Expand Down
3 changes: 3 additions & 0 deletions src/swift/Queue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public final class DispatchSpecificKey<T> {
public init() {}
}

extension DispatchSpecificKey : Sendable where T : Sendable {
}

internal class _DispatchSpecificValue<T> {
internal let value: T
internal init(value: T) { self.value = value }
Expand Down