FutureObserver

public final class FutureObserver<Value> : AnyFutureObserver
extension FutureObserver: Equatable

Used to keep track of observers, in order to supply the ability to remove observers from a future, if the result of a future is no longer interesting.

The following methods return a FutureObserver:

  • Future<Value>.whenResolved()
  • Future<Value>.whenFulfilled()
  • Future<Value>.whenRejected()
  • Removes the observer from its associated future. The observer will not be invoked after a call to remove() is made.

    Declaration

    Swift

    public func remove()
  • Declaration

    Swift

    public static func == (lhs: FutureObserver, rhs: FutureObserver) -> Bool