“Accessing shared, mutable data requires using synchronization; one way to avoid this requirement is to not share. If data is only accessed from a single thread, no synchronization is needed. This technique, thread confinement, is one of the simplest ways to achieve thread safety. When an object is confined to a thread, such usage is automatically thread-safe even if the confined object itself is not.”

Brian Goetz

Brian Goetz - “Accessing shared, mutable data requires...” 1

Similar quotes

“Whenever more than one thread accesses a given state variable, and one of them might write to it, they all must coordinate their access to it using synchronization.”

Brian Goetz
Read more

“It is far easier to design a class to be thread-safe than to retrofit it for thread safety later.”

Brian Goetz
Read more

“Needle and thread flesh and boneSpit and sinew, heartbreak is home.Your suture lines, they sparkle like diamondsBright stars to light my confinement“Stitch,”

Gayle Forman
Read more

“We construct a narrative for ourselves, and that's the thread that we follow from one day to the next. People who disintegrate as personalities are the ones who lose that thread.”

Paul Auster
Read more

“Love weaves itself from hundreds of threads.”

David Levithan
Read more