Atomic operations

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<P>Hi,</P>
<P>I need to know if, in a multithread scenario, it is safe to change the value of a primitive variable (int or object reference, for instance) while another thread is reading it.</P>
<P>What I need to avoid is that the reading thread fetch a partially written version of the primitive variable.</P>
<P>Thanks in advance,</P>
<P>Guglielmo</P>

View the full article
 
Back
Top