subscribeToStream

open override fun subscribeToStream(sub: StreamHandler<RESULT>): Unsubscribe

Adds a subscription to the stream.

On subscribing the subscription is immediately called with the current value.

Returns an unsubscribe function. Calling this function unsubscribes from the stream.

NOTICE: It is the callers' obligation to unsubscribe from the stream.