Classes
The following classes are available globally.
-
An abstract thread safe subclass of
Operation
to support asynchronous operations.Subclasses must override
See moremain
to perform any work and, if they are asynchronous, call thefinish()
method to complete the execution.Declaration
Swift
open class AsynchronousOperation : Operation, ProgressReporting
-
A sublcass of
See moreAsynchronousOperation
to execute a closure.Declaration
Swift
public final class AsynchronousBlockOperation : AsynchronousOperation
-
An
See moreAsynchronousOperation
that can finish with an error conforming toOperationError
.Declaration
Swift
open class FailableAsynchronousOperation<Failure> : AsynchronousOperation where Failure : Error
-
An
See moreAsynchronousOperation
subclass which enables a finite grouping of other operations. Use aGroupOperation
to associate related operations together, thereby creating higher levels of abstractions.Declaration
Swift
open class GroupOperation : AsynchronousOperation
-
An
AsynchronousOperation
that produces aresult
once finished.If a
See moreResultOperation
gets cancelled before being executed, no result will be produced by default.Declaration
Swift
open class ResultOperation<Success, Failure> : AsynchronousOperation where Failure : Error
-
Workaround to solve some multithreading bugs in Swift’s KVO. This needs to execute before anything can register KVO in the background so the best way to do this is before the application ever runs
KVOCrashWorkaround.installFix()
Note
it’s not required for Swift 5.1 and above, see this Swift PR