{"id":50858000,"url":"https://github.com/rcardin/scalar-2026","last_synced_at":"2026-06-14T19:33:16.030Z","repository":{"id":344902552,"uuid":"1175977419","full_name":"rcardin/scalar-2026","owner":"rcardin","description":"Material for my talk at the Scalar 2026 conference","archived":false,"fork":false,"pushed_at":"2026-05-15T10:06:50.000Z","size":3939,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T19:33:01.450Z","etag":null,"topics":["continuations","coroutines","functional-programming","java","kotlin","scala","virtual-threads"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rcardin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-08T12:57:07.000Z","updated_at":"2026-06-10T20:09:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rcardin/scalar-2026","commit_stats":null,"previous_names":["rcardin/scalar-2026"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rcardin/scalar-2026","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcardin%2Fscalar-2026","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcardin%2Fscalar-2026/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcardin%2Fscalar-2026/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcardin%2Fscalar-2026/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rcardin","download_url":"https://codeload.github.com/rcardin/scalar-2026/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcardin%2Fscalar-2026/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34335688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["continuations","coroutines","functional-programming","java","kotlin","scala","virtual-threads"],"created_at":"2026-06-14T19:33:15.343Z","updated_at":"2026-06-14T19:33:16.022Z","avatar_url":"https://github.com/rcardin.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Concurrency Triangle: Scala Fibers, Java Virtual Threads, and Kotlin Coroutines\n\nScala Fibers, Java Virtual Threads, and Kotlin Coroutines: this talk shows how this elegant solution manifests at three different abstraction levels.\n\n## Abstract\n\nOperating system thread context switches are a fundamental bottleneck in high-concurrency JVM applications. Each switch requires kernel transitions, CPU cache invalidation, and scheduling overhead. The JVM ecosystem has developed three prominent solutions: Fibers, as implemented by many Scala monadic effect systems; Java Virtual Threads (Project Loom); and Kotlin Coroutines.\n\nWhile these technologies appear vastly different on the surface, functional versus imperative, library versus runtime, they actually implement the same core pattern: replacing OS thread scheduling with user-space scheduling of continuations.\n\nThis talk shows how this elegant solution manifests at three different abstraction levels. We'll take the Cats Effect library as an example of Fibers implementation library through the IO monad. Project Loom pushes it down to the JVM runtime, making it transparent to developers. In Scala, the Ox library is built upon virtual threads. Kotlin Coroutines place it at compile time by transforming suspend functions. We'll see them as different expressions of the same fundamental breakthrough in concurrent programming.\n\n## Video\n\n[![Watch the video](https://img.youtube.com/vi/2TA-6YplrKA/maxresdefault.jpg)](https://youtu.be/2TA-6YplrKA)\n\n## References\n * [How do Fibers Work? A Peek Under the Hood](https://www.youtube.com/watch?v=x5_MmZVLiSM)\n * [Concurrency In Scala with Cats-Effect](https://github.com/slouc/concurrency-in-scala-with-ce?tab=readme-ov-file)\n * [Threading best practices in Cats Effect](https://timwspence.github.io/blog/posts/2021-01-12-threading-best-practices-cats-effect.html)\n * [Cats Effect 3](https://www.youtube.com/watch?v=JrpFFRdf7Q8)\n * [Core Runtimes \u003e Schedulers](https://typelevel.org/cats-effect/docs/schedulers)\n * [Kotlin 101: Coroutines Quickly Explained](https://rockthejvm.com/articles/kotlin-101-coroutines)\n * [Kotlin Coroutine Internals](https://medium.com/better-programming/kotlin-coroutine-internals-49518ecf2977)\n * [Coroutines under the hood](https://kt.academy/article/cc-under-the-hood)\n * [The Ultimate Guide to Java Virtual Threads](https://rockthejvm.com/articles/the-ultimate-guide-to-java-virtual-threads#how-to-create-a-virtual-thread)\n * [Continuations - Under the Covers](https://www.youtube.com/watch?v=6nRS6UiN7X0)\n * [Continuations: The magic behind virtual threads in Java](https://www.youtube.com/watch?v=HQsYsUac51g)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcardin%2Fscalar-2026","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frcardin%2Fscalar-2026","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcardin%2Fscalar-2026/lists"}