logo

Quotes About Thread-safe

It is far easier to design a class to be thread-safe than to retrofit it for thread safety later.
~ Brian Goetz
If you haven't considered concurrent access in your class design, some of these approaches can require significant design modifications, so fixing the problem might not be as trivial as this advice makes it sound. It is far easier to design a class to be thread-safe than to retrofit it for thread safety later. In
~ Brian Goetz
When designing thread-safe classes, good object-oriented techniques—encapsulation, immutability, and clear specification of invariants—are your best friends.
~ Brian Goetz
A class is thread-safe if it behaves correctly when accessed from multiple threads, regardless of the scheduling or interleaving of the execution of those threads by the runtime environment, and with no additional synchronization or other coordination on the part of the calling code.
~ Brian Goetz
Stateless objects are always thread-safe.
~ Brian Goetz
An immutable object is one whose state cannot be changed after construction. Immutable objects are inherently thread-safe; their invariants are established by the constructor, and if their state cannot be changed, these invariants always hold.
~ Brian Goetz
Immutable objects are always thread-safe.
~ Brian Goetz