Re: more on hotjava

Date view Thread view Subject view Author view

From: Godmar Back (gback@cs.utah.edu)
Date: Tue Nov 17 1998 - 15:49:42 EST


>
> Godmar,
>
> I've added the getTreeLock method.
>

 Thanks.

> Just because component doesn't have a synchrnized keyword in it doesn't make our
> AWT un-threadsafe. All the necessary methods in the various parts of AWT are
> synchronized as they should be.
>

Okay. I really haven't looked much at the awt code.
However, consider

Component.setBounds(). This method calls doLayout(), which may be
overridden by a user-defined method. When this happens, no lock
is taken. This appears wrong, but as I said I don't really know how
the awt works. Or is the overriding method supposed to synchronize
on the getTreeLock() object?

        - Godmar

> Cheers
> Tim
>
> > So, the thing i'm currently hitting is this:
> >
> > java.lang.NoSuchMethodError: java/awt/Component.getTreeLock()Ljava/lang/Object;
> > at sunw/hotjava/misc/Globals.getAwtLock(420)
> > at sunw/hotjava/doc/Document.setProperty(484)
> > at sunw/hotjava/doc/Document.<init>(210)
> > at sunw/hotjava/doc/Document.<init>(171)
> > at sunw/hotjava/ui/HotList.writeHTMLFile(1247)
> > at sunw/hotjava/ui/HotListWriter.run(87)
> > at java/lang/Thread.run(140)
> >
> > Sure enough, there's no "getTreeLock()" method in Component.
> > So I looked closer whether I could just add one, and it seems that
> > Component.java doesn't have a single use of the word "synchronized"
> > in it.
> >
> > I could of course return "this" or some other dummy object,
> > but should Component.java be made thread-safe?
> > Also, does that mean Kaffe's AWT is not thread-safe?
> >
> > - Godmar
>
>
>
> --
> Tim Wilkinson Tel: +1 510 704 1660
> Transvirtual Technologies, Inc., Fax: +1 510 704 1893
> Berkeley, CA, USA. Email: tim@transvirtual.com
>
>
>
>


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:03 EDT