On Mon, 17 Jun 2024 13:25:07 GMT, Inigo Mediavilla Saiz <d...@openjdk.org> wrote:
>> `started.countDown()` is replaced with `started.set(true)` to remove the >> possibility that "Dummy Vthread" unmounts here. > > @AlanBateman explained to me why that is possible in > https://github.com/openjdk/jdk/pull/19482#issuecomment-2166116062 and > https://github.com/openjdk/jdk/pull/19482#issuecomment-2167374446. > > Alan can correct me if I'm wrong, but I think that the dummy thread trying to > unpark the main (virtual) thread needs to run as the carrier to avoid nested > parking. See: > https://github.com/openjdk/jdk/blob/412e306d81209c05f55aee7663f7abb80286e361/src/java.base/share/classes/java/lang/VirtualThread.java#L707 So IIUC you've changed the test to try to avoid the problem that was causing the test to fail, as well as changing the code so the test would not fail. But now we won't/may-not actually test that. ?? I guess I want to see that the original failing test now passes with the fix. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19744#discussion_r1644149144