- The java.util.concurrent.locks package provides support for locks, which are objects that offer an alternative to using synchronized to control access to a shared resource
- Before accessing a shared resource, the lock that protects that resource is acquired. When access to the resource is complete, the lock is released
- If a second thread attempts to acquire the lock when it is in use by another thread, the second thread will suspend until the lock is released.
- All locks implement the Lock interface.
Sunday, August 28, 2016
Locks in java
Subscribe to:
Post Comments (Atom)
Required details
--------------------------------------------------------------------------------------------------------------------------- C:\Program File...
-
On macOs 10.15 and later , default terminal is zsh. follow are the steps : vi ~/.zshenv_profile Add env variable path JAVA_HOME=/Library...

No comments:
Post a Comment