Sailing Modern Java
summary
Covers Java 19/20 features with runnable demos: shows virtual threads via Executors.newVirtualThreadPerTaskExecutor creating 50,000 threads (and reaching higher until memory limits), warns virtual threads help I/O waits not CPU-bound work, and uses toxic-proxy with Testcontainers to detect pinned threads. Demonstrates StructuredTaskScope.shutdownOnFailure cutting a multi-call wait from ~1s to ~25ms, and exercises the Foreign Function & Memory API by invoking getuid through a downcallhandle in a Docker container (exit code 42). Reminds to use --enable-preview for preview JEPs.
AI-written summary · about
chapters (31)
- 0:00Introduction
- 2:10Release Notes
- 3:40Migration to Java 20
- 5:05LTS Cadence
- 5:25Changes
- 6:25Enable Preview
- 7:00Reactive
- 8:13Project Loom
- 9:07Virtual Threads
- 11:30Testing Virtual Threads
- 12:38Starting Virtual Threads
- 13:40Virtual Threads Demo
- 17:15Dont go for a year
- 17:52Dont reuse virtual threats
- 19:50Example
- 26:35Structured Concurrency
- 31:31Scope
- 34:45Record
- 35:45Nesting
- 36:16Native stuff
- 37:02Memory API
- 38:01VAR handles
- 39:04malloc
- 39:45getuid
- 43:10random things
- 43:29slow startup
- 44:50Virtual Threats
- 45:33Feedback
- 45:57Anonymous Survey
- 46:08Thank you
- 46:22Slides
related talks
52mSailing Modern Java
01h 00mSailing Modern Java
02h 34mJava™ 19 & 20. What's new and noteworthy?
01h 50mJava™ 19 & 20. What's new and noteworthy?
51mIntroduction and Pitfalls of Java's New Concurrency Model
46mJava 21: The revolution of virtual threads - A Deep dive
45mIntroduction and pitfalls of virtual threads
49mButcher Virtual Threads like a pro!
