Promise
public class Promise<T>
The Promise type is a backend for the Future type.
It manages completion handlers to be called in the future.
Use Promise to provide a Future that you can complete.
-
Undocumented
Declaration
Swift
public class Promise<T> -
Completes this future with a value, on a particular queue (defaulted to globalQueue). Handlers are consumed in parallel, unless the given queue is synchronous.
Declaration
Swift
public func complete(t: T, queue: DispatchQueue = Dispatch.globalQueue) -
Get a front-facing
Futureinstance for this promise.Declaration
Swift
public var future: Future<T>
Promise Class Reference