Skip to content

Commit

Permalink
Mark queues Sendable
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Jan 26, 2024
1 parent 3d3ab5a commit 8de872d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/MainOffender/MainDispatchQueue.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

public final class MainDispatchQueue {
public final class MainDispatchQueue: Sendable {
public func async(
group: DispatchGroup? = nil,
qos: DispatchQoS = .unspecified,
Expand Down
2 changes: 1 addition & 1 deletion Sources/MainOffender/MainOperationQueue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation
/// An `OperationQueue` proxy that accepts `@MainActor`-compatible closures.
///
/// All operations are actually run on `OperationQueue.main`.
public final class MainOperationQueue {
public final class MainOperationQueue: Sendable {
public func addOperation(_ block: @MainActor @escaping @Sendable () -> Void) {
OperationQueue.main.addOperation {
MainActor.runUnsafely(block)
Expand Down

0 comments on commit 8de872d

Please sign in to comment.