summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/MullvadVPN/Operations/AsyncOperation.swift9
1 files changed, 8 insertions, 1 deletions
diff --git a/ios/MullvadVPN/Operations/AsyncOperation.swift b/ios/MullvadVPN/Operations/AsyncOperation.swift
index 9936108e58..c4f628434d 100644
--- a/ios/MullvadVPN/Operations/AsyncOperation.swift
+++ b/ios/MullvadVPN/Operations/AsyncOperation.swift
@@ -10,7 +10,6 @@ import Foundation
/// A base implementation of an asynchronous operation
class AsyncOperation: Operation {
-
/// A state lock used for manipulating the operation state flags in a thread safe fashion.
private let stateLock = NSRecursiveLock()
@@ -87,3 +86,11 @@ class AsyncOperation: Operation {
didChangeValue(for: \.isExecuting)
}
}
+
+extension Operation {
+ func addDependencies(_ dependencies: [Operation]) {
+ for dependency in dependencies {
+ addDependency(dependency)
+ }
+ }
+}