Alexey Soshin
1 min readMar 23, 2018

--

What I wonder, though, is how exactly “happens before” is achieved with Kotlin coroutines?

In your case, A is:

val m = mutableMapOf<Int,String>()
m[1] = "one"
yield
() // or other suspending function

And B is:

m[2] = "two" // (2)

So what’s A=>B?

--

--

Alexey Soshin
Alexey Soshin

Written by Alexey Soshin

Solutions Architect @Depop, author of “Kotlin Design Patterns and Best Practices” book and “Pragmatic System Design” course

Responses (1)