The reputation of Bill Pugh is quite high - enough so that I would be
inclined to take his statements on this subject as beyond challenge.

Upon careful reading of the link mentioned in this thread, I came across
the following:

   It will work for 32-bit primitive values


   Although the double-checked locking idiom cannot be used for references
   to objects, it can work for 32-bit primitive values (e.g., int's or
   float's). Note that it does not work for long's or double's, since
   unsynchronized reads/writes of 64-bit primitives are not guaranteed to
   be atomic.


Based on this, it would seem to me that the code snippet staring with "if
(_jspx_inited == false) {" is safe.  Worst case, change _jspx_inited from
boolean to int.


- Sam Ruby


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

Reply via email to