{
  "id": 17713757,
  "title": "Java Virtual Threads vs Kotlin Coroutines: Suspension Models and the Shifting Bottleneck",
  "url": "https://urgent.news/2026/11/02/java-virtual-threads-vs-kotlin-coroutines-suspension-models-and-the",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-02T00:51:17.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/jogakdal/java-virtual-threads-vs-kotlin-coroutines-suspension-models-and-the-shifting-bottleneck-3ghb"
  },
  "original_language": "en",
  "account": "Java virtual threads and Kotlin coroutines are two methods to handle suspension in JVM server development, both aiming to improve code readability and resource efficiency. However, they achieve this goal through different suspension models.\n\nIn Java virtual threads, suspension and resumption are managed by saving the stack and unmounting from the carrier, which is an OS thread. This allows the thread to return to the original OS thread without any marker in the code. For instance, in the provided code snippet, the `for` loop runs each task on its own virtual thread, which can efficiently handle operations like fetching data from a database without blocking the OS thread.\n\nOn the other hand, Kotlin coroutines handle suspension by calling the function again after saving local variables and the next label value in a Continuation object. This makes suspension points explicit in the source code, requiring the use of `suspend` and `launch` keywords. While coroutines also release the thread while waiting, the function has to be explicitly declared as `suspend`, and the suspension point is marked in the code.\n\nIn both cases, the key difference lies in how the suspended state is kept. Virtual threads keep it by saving the stack, while coroutines do it by returning from the function and calling it again later. Despite these differences, neither approach increases the total amount of resources; they merely shift the bottleneck to a less visible place. The resource bottleneck doesn't disappear, it just moves to a more hidden location.",
  "summary": "The usage and internals of Java virtual threads and Kotlin coroutines are already widely covered. Rather than explaining each technology separately, this post compares how their different ways of implementing suspension change how code is written and operated. It is written for JVM server developers who have adopted or are evaluating virtual threads, and it focuses on where the costs that virtual…",
  "key_points": [
    "Java virtual threads save stack for suspension, OS threads resume",
    "Kotlin coroutines save local variables and label in Continuation object",
    "Both shift resource bottleneck to less visible location"
  ],
  "editors_take": "Choosing between these suspension models forces developers to decide whether to prioritize seamless, transparent execution through stack management or explicit, keyword-driven control over application state.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}