We've received several reports that a mysterious Timer task prevents some of the applications that use our lib (that internally uses the EventBus) prevents the JVM from closing properly (see nifty-gui/nifty-gui#365 or nifty-gui/nifty-gui#364)
Further investigation points to the cleanup Timer created in this line:
https://github.com/michaelbushe/EventBus/blob/master/src/org/bushe/swing/event/ThreadSafeEventService.java#L2100
if (cleanupTimer == null) {
cleanupTimer = new Timer();
}
Since this Timer is created as a non daemon Thread it is my understanding that while it is running it will in fact prevent the JVM from ending properly.
Could this line be changed to: new Timer(true) to prevent this behaviour or is there something we're missing?
Thanks!
We've received several reports that a mysterious Timer task prevents some of the applications that use our lib (that internally uses the EventBus) prevents the JVM from closing properly (see nifty-gui/nifty-gui#365 or nifty-gui/nifty-gui#364)
Further investigation points to the cleanup Timer created in this line:
https://github.com/michaelbushe/EventBus/blob/master/src/org/bushe/swing/event/ThreadSafeEventService.java#L2100
Since this Timer is created as a non daemon Thread it is my understanding that while it is running it will in fact prevent the JVM from ending properly.
Could this line be changed to:
new Timer(true)to prevent this behaviour or is there something we're missing?Thanks!