mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-05 13:40:18 +00:00
8307486: ProcessTools.java should wait until vthread is completed before checking exceptions
Reviewed-by: dholmes, alanb
This commit is contained in:
parent
44fa12e751
commit
3aff5eacbd
@ -895,10 +895,10 @@ public final class ProcessTools {
|
||||
tg.uncaughtThrowable = error;
|
||||
}
|
||||
});
|
||||
if (tg.uncaughtThrowable != null) {
|
||||
throw new RuntimeException(tg.uncaughtThrowable);
|
||||
}
|
||||
vthread.join();
|
||||
if (tg.uncaughtThrowable != null) {
|
||||
throw tg.uncaughtThrowable;
|
||||
}
|
||||
} else if (wrapper.equals("Kernel")) {
|
||||
MainThreadGroup tg = new MainThreadGroup();
|
||||
Thread t = new Thread(tg, () -> {
|
||||
@ -913,7 +913,7 @@ public final class ProcessTools {
|
||||
t.start();
|
||||
t.join();
|
||||
if (tg.uncaughtThrowable != null) {
|
||||
throw new RuntimeException(tg.uncaughtThrowable);
|
||||
throw tg.uncaughtThrowable;
|
||||
}
|
||||
} else {
|
||||
mainMethod.invoke(null, new Object[] { classArgs });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user