Choose language

Forgot your password?

Need a Spoofbox account? Create one for FREE!

No subscription or hidden extras

Login


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


#java #programming #synchronicity



Quote by Brian Goetz

Read through all quotes from Brian Goetz



About Brian Goetz





Did you know about Brian Goetz?

back to top