Advanced Kotlin
Q69 / 100

How does Kotlin implement coroutine suspension internally?

Correct! Well done.

Incorrect.

The correct answer is B) The compiler transforms suspend functions into state machines using a Continuation callback parameter

B

Correct Answer

The compiler transforms suspend functions into state machines using a Continuation callback parameter

Explanation

The Kotlin compiler desugars suspend functions into state machines with a Continuation<T> parameter. Each suspension point becomes a state; the continuation is resumed when the result is available.

Progress
69/100