[concurrency-interest] Confused about Component.getTreeLock()

Peter Kovacs peter.kovacs.1.0rc at gmail.com
Tue Mar 6 06:23:10 EST 2007


Hi,

>From samples found on the Internet I can see that the
Component.getTreeLock() method is mainly used in custom layout
managers. Doesn't the assumption implied by the use of this lock go
against the general rule that Java graphical components should not be
manipulated from a thread other than the AWT Event Handler? In other
words: why are layout management functions likelier to be executed in
a custom thread -- a situation where locking is required at all --
than are other kinds of GUI functions?

Thanks
Peter


More information about the Concurrency-interest mailing list