Puneeth

Add friend
Sign in to Goodreads to learn more about Puneeth.


Loading...
“When a field is declared volatile, the compiler and runtime are put on notice that this variable is shared and that operations on it should not be reordered with other memory operations. Volatile variables are not cached in registers or in caches where they are hidden from other processors, so a read of a volatile variable always returns the most recent write by any thread.”
Brian Goetz, Java Concurrency in Practice

“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, Java Concurrency in Practice

“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, Java Concurrency in Practice

“The possibility of incorrect results in the presence of unlucky timing is so important in concurrent programming that it has a name: a race condition. A race condition occurs when the correctness of a computation depends on the relative timing or interleaving of multiple threads by the runtime; in other words, when getting the right answer relies on lucky timing.”
Brian Goetz, Java Concurrency in Practice

“It is far easier to design a class to be thread-safe than to retrofit it for thread safety later.”
Brian Goetz, Java Concurrency in Practice

year in books
Smita D...
0 books | 34 friends

Harsha BK
1 book | 136 friends

Indrani...
1 book | 30 friends

Ashish Jha
1 book | 12 friends





Polls voted on by Puneeth

Lists liked by Puneeth