[gclist] Garbage collection and XML

Fergus Henderson fjh@cs.mu.oz.au
Thu, 8 Mar 2001 04:35:34 +1100


On 07-Mar-2001, Boehm, Hans <hans_boehm@hp.com> wrote:
> You could presumably also synchronize on the strings, effectively turning
> them into locks.  In that case sharing might result in unexpected lock
> contention or deadlock.  The fact that every object can be used for
> synchronization means that in some sense nothing is immutable.

How would you synchronize on the strings?
The java.lang.String class is declared `final', so you can't
inherit from it, and AFAIK there are no synchronized methods
in java.lang.String.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.