python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Why does collecting this Flow not terminate?
As part of practicing coroutines and flow, I tried an implementation of RxJava's amb/race operator where I don't allow myself to use channels directly. Or, to put it differently, I use shareIn (Share...
Julian A.
Votes: 0
Answers: 0
How to Unit Test a ViewModel using Flows and LiveData with runTest?
Imagine my ViewModel looks like this :
class ViewModelA(
repository: Repository,
ioCoroutineDispatcher: CoroutineDispatcher,
) : ViewModel() {
val liveData : LiveData<String> = repos...
Nino DELCEY
Votes: 0
Answers: 1
How to make a flow run on a different thread than the one used for collection?
I have a flow that does CPU intensive work as shown below:
fun doWork():Flow<MyResult> =
flow{
for(i in 1..100){
//calculate()
}
emit(MyResult())
}
I collect from it inside a Fr...
Mena
Votes: 0
Answers: 1
How can i work with flow inside repository android?
I wrote code which works fine without kotlin flow, but i want to try kotlin flow and when i used it inside repository but somehow it is not even entering inside i could not find any solution since it ...
Jakhongir Jalilov
Votes: 0
Answers: 1