Thread Safety with Phaser, StampedLock and VarHandle

Day 2 /  / Track 1  /  EN

Every major Java version introduces a new and better way of managing state. Java 7 gave us Phaser as a replacement for CountDownLatch and CyclicBarrier. Hardly any programmers know how it works, even though we are now on Java 11 LTS. Java 8 gave us StampedLock, useful as a lighter read "lock" when building concurrent classes. Again, not very widely known, but lots of use cases. Java 9/10/11 introduced VarHandle as an escape latch for the Unsafe addicts. In this talk, Heinz and John will show all three concepts and explain when each should be used.


Download presentation

Speakers

Heinz Kabutz
JavaSpecialists.eu

Heinz is the mastermind behind The Java Specialists' Newsletter. He has a PhD in Computer Science. Heinz has programmed significant portions of several large Java applications and has taught Java to thousands of professional programmers. He is a regular speaker at all the major Java conferences.

Heinz was chosen as a Java Champion by Sun Microsystems, the inventors of Java, for his work in advancing Java.

Heinz presents Java training courses anywhere in the world, either in person or via remote teaching technologies. He is the author of many courses, including Java Specialist Master, Design Patterns, and Concurrency Specialist Courses.

John Green
JavaSpecialists.eu

John Green is a lifelong learner, polyglot, and lover of mathematics. He delights in trawling through code, trying to deduce what the author really wanted it to do. If he could figure out how to set the good stuff to music, he would write a grand symphony entitled "In Fondo alla Coda".

Invited Experts

Sebastian Daschner
 

Sebastian Daschner is a self-employed Java consultant, author and trainer and is enthusiastic about programming and Java. He is the author of the book "Architecting Modern Java EE Applications". Sebastian is participating in open source standardization processes such as the JCP or the Eclipse Foundation, helping forming the future standards of Enterprise Java, and collaborating on various open source projects. For his contributions in the Java community and ecosystem he was recognized as a Java Champion, Oracle Developer Champion, and JavaOne Rockstar. Besides Java, Sebastian is a heavy user of cloud native technologies and anything related to enterprise software. Sebastian evangelizes computer science practices, in his newsletter, podcast, and videos, and on Twitter via @DaschnerS. Sebastian kickstarted the JOnsen and jSpirit unconferences that connect Java developers throughout the globe. When not working with technology, he also loves coffee and to travel the world.