On 12/5/12 3:59 AM, David Holmes wrote:
Java 7 introduced support for parallel classloading by adding to each
class loader a ConcurrentHashMap, referenced through a new field,
parallelLockMap. This contains a mapping from class names to Objects
to use as a classloading lock for that class name. This scheme has a
number of inefficiencies. To address this we propose for Java 8 the
notion of a fully concurrent classloader ...
This is a fairly simple proposal that I've written up as a blog entry:
https://blogs.oracle.com/dholmes/entry/parallel_classloading_revisited_fully_concurrent
It's a good and simple proposal and also handles the backward
compatibility nicely.
I think having getClassLoadingLock() to return null for a fully
concurrent loader is a good idea. In case if any code synchronizes on
the returned value after migrating to fully concurrent class loader, it
will catch such usage (it might be very rare)/
I agree with Alan's suggestion - we should consider deprecating
registerAsParallelCapable.
Mandy