December 2022
Intermediate to advanced
528 pages
15h 41m
English
During the execution by a thread of a compound operation that consists of multiple steps, other threads can observe and interfere with the state of an application as it exists between these steps. By contrast, an atomic operation consists of a single step, with no possibility of disruption during that step. Locking is a mechanism that can be used to make a compound operation by a thread appear atomic to other threads, thereby preventing them from interfering during its execution in ways that would be detrimental to correctness. Different systems define their own locking mechanisms. In particular, Java defines a basic form of locks that can be used with any JVM language.
Chapter 17 discussed a ...
Read now
Unlock full access