classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deadlock in java.net.URLClassLoader


From: Andrew Haley
Subject: Re: Deadlock in java.net.URLClassLoader
Date: Mon, 5 Sep 2005 11:54:09 +0100

Tom Tromey writes:
 > >>>>> "Andrew" == Andrew Haley <address@hidden> writes:
 > 
 > Andrew> What happens is that one thread does ClassLoader.loadClass, which is
 > Andrew> synchronized on the loader, and then URLClassLoader calls toString(),
 > Andrew> which is synchronized on urlloaders.
 > 
 > Another choice would be to simply synchronize on the loader and never
 > synchronize on urlloaders.  There doesn't seem to be a particular
 > advantage to having two different locks here.

That sounds like an excellent soloution to the problem, and it never
occurred to me.  I'll re-submit.

Andrew.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]