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?
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?
Solutions Architect @Depop, author of “Hands-on Design Patterns with Kotlin” book and “Web Development with Kotlin” course
Solutions Architect @Depop, author of “Hands-on Design Patterns with Kotlin” book and “Web Development with Kotlin” course