mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
implement Runtime.addShutdownHook and Thread.setDaemon; avoid segfaults due to an application calling e.g. CallStaticBooleanMethod when it really meant CallStaticVoidMethod
This commit is contained in:
@ -252,10 +252,14 @@ public class Thread implements Runnable {
|
||||
return daemon;
|
||||
}
|
||||
|
||||
public void setDaemon(boolean v) {
|
||||
daemon = v;
|
||||
public synchronized void setDaemon(boolean v) {
|
||||
if (v != daemon) {
|
||||
setDaemon(this, v);
|
||||
}
|
||||
}
|
||||
|
||||
private static native void setDaemon(Thread t, boolean increment);
|
||||
|
||||
public static native void yield();
|
||||
|
||||
public synchronized void join() throws InterruptedException {
|
||||
|
Reference in New Issue
Block a user