Basic Thread Synchronization

In this chapter, we will cover the following topics:

  • Synchronizing a method
  • Using conditions in synchronized code
  • Synchronizing a block of code with a lock
  • Synchronizing data access with read/write locks
  • Using multiple conditions in a lock
  • Advanced locking with the StampedLock class

Get Java 9 Concurrency Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.