> From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
> Subject: Re: Performance tricks with multiple tomcat instances
> 
> In particular, assignment to variables of any type except 
> long or double is atomic.

Note this is _assignment_ not arithmetic.  Depending on the capabilities
of the underlying hardware (and the cleverness of whichever JIT your JVM
uses), even a simple incrementation may not be atomic.  Such an action
may require a memory read, addition within the CPU, and a memory write;
preemption may occur between the read and write, causing the results of
the incrementation to be questionable if not synchronized.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to