You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Brian Goetz <br...@quiotix.com> on 2001/02/10 04:58:17 UTC

Re: Thread-safety

> > This statement is true, but very easy to misinterpret; be careful.
> > You can't use this to make an end-run around the problem in the
> > general case.  If jspx_init() creates any objects, you've gotta
> > synchronize, plain and simple.  If jspx_init() calculates
> > multiple primitive values, which can obtained through any other
> > means than its return value, you've gotta synchronize.
>
>Hmm.  Obviously this subject is much more subtle that I expected.  Thanks
>for the clarification, and in particular, the patient way in which you
>presented it.

Hi Sam;

I promised you I'd post this link as soon as it was available, which it now is.

An article on the subject of double-checked locking and its dangers is in 
this month's JavaWorld:

http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-double.html


--
Brian Goetz
Quiotix Corporation
brian@quiotix.com           Tel: 650-843-1300            Fax: 650-324-8032

http://www.quiotix.com