You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should be a Flow<User>, as UserRepository exposes an API that returns multiple instances of T over time.
ConflatedBroadcastChannel is basically a Flow<T>, as subscribing to it is cold behavior (open a subscription when you start collecting, close it when you stop collecting).
Another downside of ReceiveChannel<T> here is that it leaks how you unsubscribe. Using for(user in getUserStream) to observe would leave an opened channel.
The text was updated successfully, but these errors were encountered:
MathCoroutinesFlow/app/src/main/java/com/manuelvicnt/coroutinesflow/user/impl/UserRepository.kt
Lines 78 to 80 in e7ccced
This should be a
Flow<User>
, asUserRepository
exposes an API that returns multiple instances ofT
over time.ConflatedBroadcastChannel
is basically aFlow<T>
, as subscribing to it is cold behavior (open a subscription when you start collecting, close it when you stop collecting).Another downside of
ReceiveChannel<T>
here is that it leaks how you unsubscribe. Usingfor(user in getUserStream)
to observe would leave an opened channel.The text was updated successfully, but these errors were encountered: