Manuel Wrage
11/20/2020, 8:36 AMfun doSomething()
suspend fun doSomethingSuspending()
elizarov
11/20/2020, 9:31 AMsuspend fun doSomething()
fun doSomethingBlocking()
Blocking
variant is more dangerous and, what's worse, can be called from anywhere (by mistake), so it must have a longer nameManuel Wrage
11/20/2020, 9:34 AM// fire and forget
fun dispatch(action: Action)
// dispatches the action and suspends until consumed
suspend fun dispatchSuspend(action: Action)
fun dispatch(action: Action): Deferred<Unit>
elizarov
11/20/2020, 9:51 AMdispatchAsync
to highlight the fact that it only starts the action, but does not wait for its completion in any way.Manuel Wrage
11/20/2020, 4:27 PM