[icedtea-web] RFC: Patch to use wait() when waiting for conditions to become true

Dr Andrew John Hughes ahughes at redhat.com
Thu Apr 14 13:40:21 PDT 2011


On 15:49 Thu 14 Apr     , Deepak Bhole wrote:

snip...

> > One more thing: I think it might be better to introduce 2-3
> > lock objects just for use with .wait and .notify. I don't think
> > it's a very good idea to lock on status and applets because we
> > don't know what kind of internal synchronization they use.
> 
> Regardless of what the internal synchronization is, the worst case I can
> think of is unnecessary wake ups on notify (internal or in PAV), which I
> don't think are serious enough to be creating multiple lock only objects
> for.
> 

I mentioned this in my comments too but you seem to have committed anyway
without waiting for my response.

I think it's dangerous to be obtaining the monitor on the maps when we don't
know what the internal synchronisation policy is and could conflict with
internal locks.  Much cleaner to have our own locking in the class.

I'll post a patch.

> Cheers,
> Deepak
> 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and IcedTea
http://www.gnu.org/software/classpath
http://icedtea.classpath.org
PGP Key: F5862A37 (https://keys.indymedia.org/)
Fingerprint = EA30 D855 D50F 90CD F54D  0698 0713 C3ED F586 2A37



More information about the distro-pkg-dev mailing list