~/talk

Butcher Virtual Threads like a pro!

Talkat jPrime 2024 · 2024-05-28..05-29· [java]
slides:none on file

Java 21 virtual threads scale I/O but break when misused: demos create 1 million virtual threads on a desktop, then show CPU-bound work and pinned virtual threads causing resource exhaustion. Tests use Testcontainers + Toxiproxy to inject 500ms latency and JFR/GDK trace to detect pinning; result: a legacy synchronized, blocking Elasticsearch client pins threads, failing the test until replaced or unsynchronized. Parallel-stream experiments reveal ForkJoinPool limits; structured concurrency demos show fast cancellation when subtasks honor interruption and scope values require immutability.

AI-written summary · about

  1. 0:00Introduction
  2. 1:09Virtual threads demo
  3. 3:12Why misuse virtual threads
  4. 7:09How virtual threads work
  5. 13:32Pinning virtual threads
  6. 25:44Parallel streams demo
  7. 33:00Structured concurrency
  8. 42:10Scope values demo
  9. 48:31Summary and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.