From: Archie Cobbs (archie@whistle.com)
Date: Tue Nov 17 1998 - 11:23:06 EST
Godmar Back writes:
> At this point, I'm wondering why processClass takes a global lock at all
> as opposed to simply locking the class it is currently dealing with.
In general, locks correspond directly to some piece(s) of memory.
Holding the lock permits you to examine/modify that memory. So,
it boils down to this question: does processClass() examine/modify
global variables that are not class specific? If not, then there's
no need for a global lock. If there is, then what the heck are they
and why are they needed? Perhaps they can be eliminated.
Having gotten to a class-only lock, the only remaining problem
is possible circular deadlock (e.g., two classes with static
initializers that reference each other) but I think the JVM
class loading algorithm is specified in such a way (with
discrete steps) that this isn't a problem... correct?
-Archie
___________________________________________________________________________
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:03 EDT