# Coroutines under the hood

DevFeed: [Coroutines under the hood](<https://devfeed.tech/articles/coroutines-under-the-hood-39241.md>)

Original publisher: [Read original article](<https://kt.academy/article/cc-under-the-hood>)

Published: 2021-09-01T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [functions](<https://devfeed.tech/topics/functions.md>), [union types](<https://devfeed.tech/topics/union-types.md>)

Tags: [continuation](<https://devfeed.tech/tags/continuation.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [functions](<https://devfeed.tech/tags/functions.md>), [internals](<https://devfeed.tech/tags/internals.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [stack](<https://devfeed.tech/tags/stack.md>), [state](<https://devfeed.tech/tags/state.md>), [union-types](<https://devfeed.tech/tags/union-types.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

## AI overview

A deep dive into Kotlin coroutine implementation details, explaining suspension as state machines and describing how continuations preserve local state and represent the call stack. It also introduces continuation-passing style and the altered result types used under the hood.

## Source excerpt

A deep dive into how suspension and continuations work under the hood.