Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v2]

2023-02-21 Thread Alan Bateman
> Executors.newSingleThreadExecutor returns a delegating ExecutorService that > has finalizer to shutdown the underlying TPE when the wrapper is finalizable. > It goes back to JDK 6 and JDK-6399443. This is the last non-empty finalizer > in java.base. Removing it will likely lead to bug reports/

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v2]

2023-02-21 Thread Brent Christian
On Tue, 21 Feb 2023 18:24:05 GMT, Alan Bateman wrote: >> Executors.newSingleThreadExecutor returns a delegating ExecutorService that >> has finalizer to shutdown the underlying TPE when the wrapper is >> finalizable. It goes back to JDK 6 and JDK-6399443. This is the last >> non-empty finalize

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v2]

2023-02-21 Thread Martin Buchholz
On Tue, 21 Feb 2023 18:24:05 GMT, Alan Bateman wrote: >> Executors.newSingleThreadExecutor returns a delegating ExecutorService that >> has finalizer to shutdown the underlying TPE when the wrapper is >> finalizable. It goes back to JDK 6 and JDK-6399443. This is the last >> non-empty finalize

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v2]

2023-02-21 Thread Martin Buchholz
On Tue, 21 Feb 2023 16:36:26 GMT, Alan Bateman wrote: >> test/jdk/java/util/concurrent/Executors/AutoShutdown.java line 133: >> >>> 131: while (!terminated) { >>> 132: System.gc(); >>> 133: terminated = executor.awaitTermination(100, >>> TimeUnit.MILLISECONDS); >