• Subscribe a sink to a stream, returning a nested job. (Shorthand for .connect(...) on the active job.)

    Type Parameters

    • T

    Parameters

    • src: Stream<T>

      An event source or signal

    • sink: Sink<T>

      A callback that will receive the events

    • Optional inlet: Throttle | Inlet

      Optional - a throttle() to control backpressure

    Returns Connection

    A job that can be aborted to end the subscription, and which will end naturally (with a void return or error) if the stream ends itself.