tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Goetz <br...@quiotix.com>
Subject Re: Thread-safety
Date Sat, 10 Feb 2001 03:58:17 GMT

> > 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


Mime
View raw message