“Locking can guarantee both visibility and atomicity; volatile variables can only guarantee visibility.”

Brian Goetz

Brian Goetz - “Locking can guarantee both visibility and...” 1

Similar quotes

“Visible things can be invisible. However, our powers of thought grasp both the visible and the invisible – and I make use of painting to render thoughts visible.”

Rene Magritte
Read more

“Compound actions on shared state, such as incrementing a hit counter (read-modify-write) or lazy initialization (check-then-act), must be made atomic to avoid race conditions. Holding a lock for the entire duration of a compound action can make that compound action atomic. However, just wrapping the compound action with a synchronized block is not sufficient; if synchronization is used to coordinate access to a variable, it is needed everywhere that variable is accessed. Further, when using locks to coordinate access to a variable, the same lock must be used wherever that variable is accessed.”

Brian Goetz
Read more

“You can't guarantee success, but you can guarantee failure.”

Gregory Heath
Read more

“Man is guaranteed only those rights which he can defend.”

Jack McCoy
Read more

“You can only take steps toward the future you want. It's not guaranteed to be there.”

Amanda Howells
Read more