https://kotlinlang.org logo
#coroutines
Title
# coroutines
m

Marcin Gryszko

10/29/2019, 6:20 AM
I'm trying to dig into the internal implementation of JVM coroutines. How a coroutine block (instantiated as
SuspendLambda
resumes its execution after last suspension point when
invokeSuspend
is called again? Is the magic field
L$0
inside
SuspendLambda
responsible for this? I'm working with a dead-simple snippet to understand the inner workings:
Copy code
fun main() {
  val i = runBlocking {
    delay(1000)
    1
  }
  println(i)
}
s

suhas

10/29/2019, 6:26 AM
Would love to understand this. Writing a blog about it ?
3 Views