Java Concurrency: LockSupport

Previously we had a look at the lock class and how it works behind the scenes.
In this post, we shall look at LockSupport and its native methods which are one of the building blocks for locks and synchronization classes.

As we can see the methods of lock support are static and behind the scenes, they are based on the Unsafe class.
The Unsafe class is not intended to be used by your code directly thus only trusted code can obtain instances of it.

CategoriesUncategorized