Backend Development 9 min read

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

The article recaps a Scala & Java meetup where experts discussed the challenges of traditional Java threading, introduced JDK virtual threads as a low‑overhead concurrency solution, examined their benefits and limitations, and explored the impact of virtual threads on Scala and reactive programming.

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

On a snowy Saturday in Beijing, Tubi sponsored and hosted a Scala & Java meetup that gathered around 40 developers and many online viewers to discuss topics such as "What you miss about Scala when returning to Java," practical uses of Java and Scala in production, and the impact of Java's new virtual threads on Scala development.

The session highlighted the shortcomings of classic Java threads: high memory cost (about 1 MB per thread), costly context switches, blocking issues in synchronous I/O thread pools, callback hell in asynchronous I/O, and the contagion problem of Kotlin coroutines.

Virtual threads were presented as an ultimate solution, offering fast execution, minimal memory footprint, and the ability to write asynchronous code in a synchronous style, letting the JDK handle scheduling and thread switching.

However, the speakers also warned of drawbacks: limited effectiveness for CPU‑intensive workloads, constraints of G1 GC on large stack blocks, the possibility of pinned threads, and careful use of ThreadLocal to avoid memory bloat.

In the context of Scala, virtual threads could boost performance for non‑CPU‑bound tasks, improve the efficiency of ecosystems like Akka and Slick, and simplify asynchronous programming models.

A Q&A session featured senior engineers from Tubi and Kuaishou discussing how mature virtual threads might affect reactive frameworks, Go, and other JVM languages, concluding that while Go's niche remains, Scala and other JVM languages could see significant short‑term benefits.

The meetup concluded with a forward‑looking view that virtual threads will continue to inspire innovations at the intersection of Scala and Java, encouraging the community to experiment and adopt this new concurrency model.

Reactive ProgrammingJDKVirtual 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.