Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8298469 Obsolete legacy parallel class loading workaround for non-parallel-capable class loaders
  3. JDK-8303967

Release Note: Obsolete Legacy HotSpot Parallel Class Loading Workaround Option `-XX:+EnableWaitForParallelLoad` Is Removed

XMLWordPrintable

      Some older, user-defined class loaders would workaround a deadlock issue by releasing the class loader lock during the loading process. To prevent these loaders from encountering a `java.lang.LinkageError: attempted duplicate class definition` while loading the same class by parallel threads, the HotSpot Virtual Machine introduced a workaround in JDK 6 that serialized the load attempts, causing the subsequent attempts to wait for the first to complete.

      The need for class loaders to work this way was removed in JDK 7 when parallel-capable class loaders were introduced, but the workaround remained in the VM. The workaround was deprecated in JDK 20 and the option `-XX:+EnableWaitForParallelLoad` was introduced for users who relied on this legacy behavior. The default for this option was off.

      In JDK 21, the option `-XX:+EnableWaitForParallelLoad`, and the code to support it, has been removed.

      See CSR JDK-8304056 for more details.

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: