altavir
04/06/2018, 11:26 AMselect
clause this way:
val job = launch {
while (true) {
select<Unit> {
stateHolder.forEach { state ->
state.future.onAwait {
// do something
}
}
}
}
}
But it does not seem to enter the select clause even once. What am I doing wrong?gildor
04/06/2018, 2:38 PMaltavir
04/06/2018, 5:29 PMMutex
locks.
In fact, I keep thinking that it should be simpler. All I need is to create an observable mutable state with coroutine based subscribers.BroadcastChannel
. I missed it previously.gildor
04/07/2018, 2:13 AMaltavir
04/07/2018, 2:01 PMBroadcastChannel
. Everything seems to be working fin now.