FutureObserver

public final class FutureObserver<T> : AnyFutureObserver

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<T>.whenResolved()
  • Future<T>.whenFulfilled()
  • Future<T>.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