filmov
tv
Java Lock
Показать описание
The Java Lock interface represents a concurrent lock which can make sure only one thread at a time can lock the lock, perform its critical logic atomically, and unlock the lock again. A Java Lock is similar to a Java Synchronized block, but is more flexible and has more features.
A Java Lock can be reentrant, meaning the same thread can lock the Lock more than one time. The Lock must then be unlocked the same number of times before it is fully unlocked for other threads.
Chapters:
0:00 Java Lock and ReentrantLock introduction
2:02 Two concurrent Counter class examples
3:38 Lock and unlock the Lock inside a try-finally clause
5:00 Lock reentrance
7:03 Lock reentrance use case
10:24 Lock fairness
14:40 Lock examples
24:04 ReentrantLock methods
26:07 Java Lock vs. synchronized blocks - differences and similarities.
Java Lock Tutorial - text:
Java Synchronized Blocks - text / video:
Reentrance Lockout - text:
Starvation and Fairness - text:
Java Concurrency tutorial - text / video playlist:
A Java Lock can be reentrant, meaning the same thread can lock the Lock more than one time. The Lock must then be unlocked the same number of times before it is fully unlocked for other threads.
Chapters:
0:00 Java Lock and ReentrantLock introduction
2:02 Two concurrent Counter class examples
3:38 Lock and unlock the Lock inside a try-finally clause
5:00 Lock reentrance
7:03 Lock reentrance use case
10:24 Lock fairness
14:40 Lock examples
24:04 ReentrantLock methods
26:07 Java Lock vs. synchronized blocks - differences and similarities.
Java Lock Tutorial - text:
Java Synchronized Blocks - text / video:
Reentrance Lockout - text:
Starvation and Fairness - text:
Java Concurrency tutorial - text / video playlist:
Комментарии