Session

Coroutine Suspension Mechanics: The State Machine within

Let's gaze inside a Kotlin Coroutine structure and see the Finite State Machine (FSM) inside it. Suspension mechanics revealed.

Beneath the elegant syntax, suspending functions hide a powerful state machine transformation that the Kotlin compiler generates. This transformation can feel magical, so our goal here is to demystify how Coroutine suspension works and reveal the mechanics behind it.

We'll explore how the compiler transforms suspending functions into state machines, how local variables persist across suspensions, and how cancellation and exception handling integrate with this system.

By the end of this talk, attendees will understand the internal mechanics of coroutine suspension, enabling them to write more efficient asynchronous code, debug coroutine issues more effectively, and make better decisions about suspension points in their applications.

Andrea Della Porta

Cegeka, Mobile Technical Leader

Rome, Italy

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top