Channel

public class Channel<U, S> : EventSource

represents values that updateally arrive followed by failure of completion that completes Channel. Channel oftenly represents result of long running task that is not yet arrived and flow of some intermediate results.

  • Transforms the channel to a channel of unrelated type Correctness of such transformation is left on our behalf

    Declaration

    Swift

    func staticCast<A, B>() -> Channel<A, B>
  • Transforms the channel to a future

    Declaration

    Swift

    func makeFuture() -> Future<Success>
  • Transforms the channel to a future of unrelated type Correctness of such transformation is left on our behalf

    Declaration

    Swift

    func staticCast<T>() -> Future<T>
  • A textual representation of this instance.

    Declaration

    Swift

    public var description: String { get }
  • A textual representation of this instance, suitable for debugging.

    Declaration

    Swift

    public var debugDescription: String { get }
  • Synchronously waits for channel to complete. Returns all updates and completion

    Declaration

    Swift

    func waitForAll() -> (updates: [Update], completion: Fallible<Success>)
  • Waits for channel to complete and returns all updates and completion

    Declaration

    Swift

    func waitForAll(seconds: Double) -> (updates: [Update], completion: Fallible<Success>)?

    Parameters

    seconds

    to wait completion for

    Return Value

    completion value or nil if Future did not complete in specified timeout