Hey guys I’m trying to find an implementation of c...
# coroutines
b
Hey guys I’m trying to find an implementation of coroutines that allows me to keep a buffer of 10 items and keeps this buffer of 10 items first in first out ordering… i’ve been trying to use
SharedFlow
and
StateFlow
but none of these seem to keep the items in a buffer once they’re read they’re gone. I would normally use a BehaviorSubject in RxJava for this but haven’t been able to find the equvilant in coroutines Edit: Nevermind, the question
MutableSharedFlow
has the ability to do this (you can set it in the constructor and I missed that somehow) thanks
or BlockingQueue in java terms