Proposal: Fully Concurrent ClassLoading (original) (raw)

Alan Bateman Alan.Bateman at oracle.com
Thu Dec 6 11:35:33 UTC 2012


On 05/12/2012 11:59, 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/parallelclassloadingrevisitedfullyconcurrent The jdk7 implementation is very unfortunate, it's a pity this wasn't caught before 7 shipped.

I think the proposal is good, it preserves compatibility, and if there are loaders calling registerAsParallelCapable now (probably very few) then it they may be able to change to using registerAsFullyConcurrent without too much work.

I am tempted to suggest that registerAsParallelCapable should be deprecated too.

-Alan.



More information about the core-libs-dev mailing list