page banner
'Synchronizing threads with Java locks' post illustration
Synchronizing threads with Java locks

Java locks often supersede synchronized blocks and methods by allowing to back out from the synchronization attempt. This post shows how to use the feature, and demonstrates some other basic concepts, like the lock fairness and reentrant locks, which should help you to get started with the lock-based synchronization.