diff options
| author | Bug Magnet <marco.nikic@mullvad.net> | 2025-01-14 11:49:21 +0100 |
|---|---|---|
| committer | Bug Magnet <marco.nikic@mullvad.net> | 2025-01-14 11:49:21 +0100 |
| commit | ed0b9cd0283e26e216fbb7edf5cd6e5bcf042cde (patch) | |
| tree | 6fc5be4a68ffde2337d1bc3bb516ff46144a07be /ios/Operations/AsyncBlockOperation.swift | |
| parent | d2949b4a0b1d3d86a25de1569dc8308c9d7fe237 (diff) | |
| parent | e71db0cfc12bd561532b73722983175edab2482c (diff) | |
| download | mullvadvpn-ed0b9cd0283e26e216fbb7edf5cd6e5bcf042cde.tar.xz mullvadvpn-ed0b9cd0283e26e216fbb7edf5cd6e5bcf042cde.zip | |
Merge branch 'fix-warnings-introduced-by-xcode-16-ios-741'
Diffstat (limited to 'ios/Operations/AsyncBlockOperation.swift')
| -rw-r--r-- | ios/Operations/AsyncBlockOperation.swift | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ios/Operations/AsyncBlockOperation.swift b/ios/Operations/AsyncBlockOperation.swift index 062fc528f5..69e52aff0e 100644 --- a/ios/Operations/AsyncBlockOperation.swift +++ b/ios/Operations/AsyncBlockOperation.swift @@ -10,11 +10,14 @@ import Foundation import protocol MullvadTypes.Cancellable /// Asynchronous block operation -public class AsyncBlockOperation: AsyncOperation { - private var executor: ((@escaping (Error?) -> Void) -> Cancellable?)? +public class AsyncBlockOperation: AsyncOperation, @unchecked Sendable { + private var executor: ((@escaping @Sendable (Error?) -> Void) -> Cancellable?)? private var cancellableTask: Cancellable? - public init(dispatchQueue: DispatchQueue? = nil, block: @escaping (@escaping (Error?) -> Void) -> Void) { + public init( + dispatchQueue: DispatchQueue? = nil, + block: @escaping @Sendable (@escaping @Sendable (Error?) -> Void) -> Void + ) { super.init(dispatchQueue: dispatchQueue) executor = { finish in block(finish) @@ -22,7 +25,7 @@ public class AsyncBlockOperation: AsyncOperation { } } - public init(dispatchQueue: DispatchQueue? = nil, block: @escaping () -> Void) { + public init(dispatchQueue: DispatchQueue? = nil, block: @escaping @Sendable () -> Void) { super.init(dispatchQueue: dispatchQueue) executor = { finish in block() @@ -33,7 +36,7 @@ public class AsyncBlockOperation: AsyncOperation { public init( dispatchQueue: DispatchQueue? = nil, - cancellableTask: @escaping (@escaping (Error?) -> Void) -> Cancellable + cancellableTask: @escaping @Sendable (@escaping @Sendable (Error?) -> Void) -> Cancellable ) { super.init(dispatchQueue: dispatchQueue) executor = { cancellableTask($0) } |
