Jochen Theodorou a écrit : > Rémi Forax schrieb: > >> Jochen Theodorou a écrit : >> >>> Hi all, >>> >>> can someone explain why java.lang.ClassLoader.loadClassInternal has to >>> be synchronized? ok, the method is called directly from the VM and I >>> assume that this is some kind of performance optimization, which helps >>> avoiding getting that lock the old fashioned way. But that method really >>> does nothing more than calling loadClass... which then can synchronize >>> or not? So is it there to enforce synchronization? Why that? >>> >>> >> I don't know but it's no more the case if the classloader is parallel >> capable in jdk7. >> > > parallel capable? Is there some material on that? >
A parrallel capable classloader doesn't use the classloader as lock but a lock by loaded class. Javadoc API: http://download.java.net/jdk7/docs/api/java/lang/ClassLoader.html and http://download.java.net/jdk7/docs/api/java/lang/ClassLoader.html#registerAsParallelCapable() The only spec, I know is this mail : http://mail.openjdk.java.net/pipermail/core-libs-dev/2008-November/000872.html http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20081113/44f8229b/attachment-0004.html > bye Jochen > > cheers, Rémi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
