subscribe

abstract fun subscribe(subscriber: (T) -> Unit): Subscription(source)

Creates a new subscription, emitting values by calling the subscriber when updates are received.

The latest value is instantly replayed.

Once the subscriber has been subscribed, it will receive events indefinitely until it has been canceled.

Return

the subscription

Since

0.1.0

Parameters

subscriber

the subscriber