Skip to content

Commit

Permalink
8327501: Common ForkJoinPool prevents class unloading in some cases
Browse files Browse the repository at this point in the history
Reviewed-by: alanb
  • Loading branch information
Viktor Klang committed Mar 7, 2024
1 parent 1261740 commit 53c4714
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1140,9 +1140,12 @@ public final ForkJoinWorkerThread newThread(ForkJoinPool pool) {
boolean isCommon = (pool.workerNamePrefix == null);
@SuppressWarnings("removal")
SecurityManager sm = System.getSecurityManager();
if (sm == null)
return new ForkJoinWorkerThread(null, pool, true, false);
else if (isCommon)
if (sm == null) {
if (isCommon)
return new ForkJoinWorkerThread.InnocuousForkJoinWorkerThread(pool);
else
return new ForkJoinWorkerThread(null, pool, true, false);
} else if (isCommon)
return newCommonWithACC(pool);
else
return newRegularWithACC(pool);
Expand Down

0 comments on commit 53c4714

Please sign in to comment.