RFR: 8357146: ForkJoinPool:schedule(*) does not throw RejectedExecutionException when pool is shutdown
Alan Bateman
alanb at openjdk.org
Sat May 24 15:59:57 UTC 2025
On Sat, 24 May 2025 11:35:33 GMT, Doug Lea <dl at openjdk.org> wrote:
> Method startDelayScheduler should trap the ISE thrown by SharedThreadContainer.start and possibly re-try termination before eventually throwing RejectedExecutionException.
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 3475:
> 3473: ds = delayScheduler = null;
> 3474: unlockRunState();
> 3475: tryTerminate(false, false);
This reset okay, and the schedule methods will throw REE. The change makes me wonder about the OOME "unable to create new native thread" scenario, should the schedule methods propagate it or throw REE with the OOME as cause?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25431#discussion_r2105868632
More information about the core-libs-dev
mailing list