I am a huge fun of suspendCoroutine but sometimes ...
# coroutines
c
I am a huge fun of suspendCoroutine but sometimes I just to have a callback which signals me a value changed, I guess I need to provide it myself
g
Right, you need some class that encapsulate state (value) and notifies on value set and if get value is suspendable function, you can just suspend until value is available. It's actually description of channels, but channel also support multi-thread usage and stream of events, not only single one.