RFR: 8307486: ProcessTools.java should wait until vthread is completed before checking exceptions

David Holmes dholmes at openjdk.org
Tue May 9 02:34:23 UTC 2023


On Mon, 8 May 2023 23:16:51 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> Updated processtools to check exception after join().
> 
> Tested with running CI virtual thread tests.

Moving the join() is fine but I don't think the other changes are wanted.

Thanks.

test/lib/jdk/test/lib/process/ProcessTools.java line 899:

> 897:                 });
> 898:             if (tg.uncaughtThrowable != null) {
> 899:                 throw new RuntimeException(tg.uncaughtThrowable);

I think the wrapping with RuntimeException should be preserved because the uncaughtThrowable was thrown in a different thread and we want an exception that is thrown in the current thread.

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

Changes requested by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13873#pullrequestreview-1417751218
PR Review Comment: https://git.openjdk.org/jdk/pull/13873#discussion_r1188054810


More information about the hotspot-dev mailing list