> This change adds an option **EnableWaitForParallelLoad** to enable the legacy 
> behavior where the VM will manage synchronization for multiple threads 
> loading the same class using a non-parallel capable class loader that have 
> released the class loader lock.  The VM will break the class loader lock for 
> parallel threads trying to load the class, and wait for the first thread that 
> initiated loading the class to complete.  The subsequent threads will use the 
> result of the first thread, rather than get a LinkageError: duplicate class 
> definition for loading the class without synchronization.
> Releasing the class loader lock was a common workaround for class loaders 
> that used a non-hierarchical delegation scheme to avoid deadlock, before 
> parallel capable class loading was added. 
> https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassLoader.html#registerAsParallelCapable()
> 
> Tested with tier1-6 and internal applications.

Coleen Phillimore has updated the pull request incrementally with one 
additional commit since the last revision:

  Fix logic in assert

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/10832/files
  - new: https://git.openjdk.org/jdk/pull/10832/files/59c07651..2d70c34f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=10832&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10832&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/10832.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10832/head:pull/10832

PR: https://git.openjdk.org/jdk/pull/10832

Reply via email to