python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Varhandles and volatile and memory access
I am trying to understand Varhandles but some examples contain different approaches to the visibility of a variable.
E.g.
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
clas...
Matrix12
Votes: 0
Answers: 1
How to change the value of a variable without the compiler knowing?
I want to verify the role of volatile by this method. But my inline assembly code doesn't seem to be able to modify the value of i without the compiler knowing. According to the articles I read, I onl...
qingl
Votes: 0
Answers: 1
Will the read/write of the 8 byte struct in these methods be atomic?
I've been learning about atomic operations and C# alignment + atomicity guarantees. I want to see if I understand them correctly. Will the extension methods in the example be atomic, or is there somet...
Petrusion
Votes: 0
Answers: 0
Is volatile is needed for basic primitive read write operations?
I've read many articles that compare volatiles and locks. From my understanding lock guarantees that only one thread can use the lock and run the critical code in parallel, and volatile disables the m...
nrofis
Votes: 0
Answers: 1