summaryrefslogtreecommitdiffhomepage
path: root/ios/Operations/MutuallyExclusive.swift
blob: 5a87cd1a32105211d6a8018685a9fced34b51c9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//
//  MutuallyExclusive.swift
//  Operations
//
//  Created by pronebird on 25/09/2022.
//  Copyright © 2026 Mullvad VPN AB. All rights reserved.
//

import Foundation

public final class MutuallyExclusive: OperationCondition {
    public let name: String

    public var isMutuallyExclusive: Bool {
        true
    }

    public init(category: String) {
        name = "MutuallyExclusive<\(category)>"
    }

    public func evaluate(for operation: Operation, completion: @escaping (Bool) -> Void) {
        completion(true)
    }
}