Backend Development 9 min read

Virtual Threads: The Ultimate JDK Concurrency Solution – Highlights from the Scala & Java Meetup

The article recaps a Scala & Java meetup where experts discussed Java virtual threads as a breakthrough for JDK concurrency, examined their advantages over traditional threads, addressed limitations, explored their impact on Scala and other JVM languages, and included audience Q&A and community announcements.

Bitu Technology
Bitu Technology
Bitu Technology
Virtual Threads: The Ultimate JDK Concurrency Solution – Highlights from the Scala & Java Meetup

Last Saturday, Tubi sponsored and hosted a Scala & Java meetup in Beijing, drawing around 40 developers and many online viewers despite heavy snowfall.

The event focused on the most discussed topic: JDK concurrency and the ultimate solution—virtual threads.

Why Choose Virtual Threads?

Traditional Java threads suffer from high memory overhead (about 1 MB per thread), costly context switches, and problems with synchronous I/O thread pools, asynchronous I/O callbacks, and Kotlin coroutine contagion.

Virtual threads address these issues by offering efficient execution with low memory usage, allowing developers to write asynchronous code in a synchronous style while the JDK handles scheduling and switching.

Problems with Virtual Threads

Effective mainly for non‑CPU‑bound workloads; CPU‑intensive tasks may cause carrier thread blockage.

G1 GC limitations can lead to StackOverflowError when stack blocks become large.

Pinned threads may prevent a virtual thread from yielding its carrier thread, affecting performance.

Although virtual threads support ThreadLocal , careless use can cause memory spikes, especially when creating millions of threads.

Outlook for Virtual Threads in Scala

Introducing virtual threads to Scala could improve performance for non‑CPU‑intensive tasks and enhance the efficiency of ecosystems like Akka and Slick, enabling better large‑scale asynchronous programming.

Overall, virtual threads represent an exciting development for the Scala community, promising future innovations and optimizations.

Q&A Highlights

Question: How will mature virtual threads affect reactive frameworks like Akka or languages like Go?

Answer (Wei Nan): According to Java language architect Brian Goetz, virtual threads may threaten current reactive programming frameworks, but Go’s use‑case differs and its performance advantages remain.

Answer (Chun Sen): Virtual threads could enhance Scala and asynchronous programming in the short term, potentially solving blocking JDBC issues and reducing reliance on separate compute and I/O thread pools.

The meetup also featured recruitment for Tubi’s Data Team (Big Data platform lead) and promoted past Scala meetup recordings.

backend developmentJDKVirtual Threads
Bitu Technology
Written by

Bitu Technology

Bitu Technology is the registered company of Tubi's China team. We are engineers passionate about leveraging advanced technology to improve lives, and we hope to use this channel to connect and advance together.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.