Talk given at JavaVienna on March 9th, 2026.
In this talk we are going to investigate how locks can be built from concurrency primitives and discuss various questions around atomics along the way.
Matthias Langer is an IT enthusiast with 20+ years of experience with JVM technologies and is always eager to learn.
The talk code is available at various stages in the following branches:
- build-your-own-lock-from-scratch-start — Starting point
- build-your-own-lock-from-scratch-live — Live coding during the talk
- build-your-own-lock-from-scratch — Work in progress
- build-your-own-lock-from-scratch-end — Final state
- build-your-own-lock-from-scratch-end-with-comments — Final state with comments
Execute ./gradlew jmh to execute the JMH benchmarks contained in this repo.