CancelToken

open class CancelToken : ObjectBase

A token for requesting the cancellation of asynchronous requests.

  • Default initializer.

    Declaration

    Swift

    override public init()
  • Add a listener that will be notified if this token is cancelled.

    Declaration

    Swift

    open func addListener(_ listener: CancellationListener)

    Parameters

    listener

    Cancellation listener.

  • Cancel all asynchronous requests using this token.

    Declaration

    Swift

    open func cancel()
  • Has cancellation been requested?

    See also

    cancel.

    Declaration

    Swift

    open var isCancelled: Bool { get }