Just a though. shouldn't the `SharingStarted.while...
# coroutines
d
Just a though. shouldn't the
SharingStarted.whileSubscribed*()
API be called
SharingStarted.whileCollected*()
instead? since
collect {}
is used on it, not
subscribe {}
?
đźš« 1
s
The shared flow docs start out by saying “An active collector of a shared flow is called a _subscriber_”, and then they use the word subscriber from that point on. I guess a collector could just be an instance of
FlowCollector
that isn’t doing anything, so they wanted to be explicit that it means a collector instance which is currently collecting 🤷
d
I forgot to follow up. Thanks for the answer. I still don't see the necessity of using a different terminology just to distinguish between an "active" Collector and a "non active" one. I believe it would have been less confusing to just call it
whileCollected
n
By using a separate term, separate concepts and methods can be associated to the new term like
onSubscribe