-
public interface StreamSubscriptionHandle returned by every Stream
subscribe(…)call.Holding a reference to this object keeps the underlying listener / flow active. Call cancel when you no longer need updates to:
stop receiving events,
free any related resources (coroutine, network socket, etc.),
avoid memory leaks.
Instances are single-shot: once you invoke cancel the subscription is permanently terminated and calling
cancel()again has no effect.