Retlang: What is the best way to unsubscribe from a channel?
- by TrickyFishy
I'm not sure what is the best way to unsubscribe from a channel when using Retlang.
When you subscribe by calling ISubscriber<T>::Subscribe(...) you are returned an IUnsubscriber. This interface has no methods.
Going up a level, IChannel<T> also does not have any methods.
The only thing I can think of is casting an ISubscriber<T> to the concrete Channel<T> and calling its Unsubscribe() method or adding an Unsubscribe() method to ISubscriber<T>.
I'm just curious if anyone knows what they had in mind before I modify the code.