On Sun, 24 Aug 2025 07:59:05 GMT, Alan Bateman <al...@openjdk.org> wrote:

> Under load conditions, testVirtualThreadStartAndEnd can fail because the JFR 
> recording doesn't have a VirtualThreadEndEvent recorded for all virtual 
> threads. This is a test issue. ExecutorService::close waits for all tasks 
> (not threads) to finish. For ThreadPerTaskExecutor the thread terminates 
> after executing the task but there is still a small window between task 
> completion and thread termination.  The test is changed to use Thread::join 
> so it waits for the 100 threads to terminate, avoid the fragile sleep that we 
> had in the original test.

This looks good to me.

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

Marked as reviewed by jpai (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/26916#pullrequestreview-3149246326

Reply via email to