0 votes
1 view
in Java by (9.2k points)

I know every Java object can be locked. With wait, I can release the lock for another thread. I want to know does notify/notifyAll release the lock it is holding for another thread?

1 Answer

0 votes
by (19k points)

No, with notify/notifyAll you can’t release the locks. Notify releases its lock, when the awakened thread can run the code. 

Interested in Java? Check out this Java tutorial by Intellipaat.  

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Oct 26, 2019 in Java by Anvi (10.2k points)
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...