> "Boysko, Glenn" wrote:
> I was finding that by just running two threads concurrently, both
> threads where
> blocking on the same monitor which was owned by the system class
> loader.
>
> I guess I'm assuming that if two threads are both trying to load the
> same class at the same
> time that there will be synchronization, such that thread A will wait
> for thread B to finish
> loading the class. Is this not the case?
Glenn --
I'm really not familiar with the internals of particular versions of
Sun-supplied classloaders. However, I would think that if there was any
synchronization at all, it would be very, very short or multithreading
of any sort would never work well. Besides, once the class is loaded,
it should stay loaded for that classloader. It isn't loaded twice so
there really should be a very tiny wait.
I understand that you're seeing this in OptimizeIt but it's difficult
for me to believe that this is the cause of any performance problems.
Gary