harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [drlvm][shutdown] How to cleanup resources safely?
Date Tue, 21 Nov 2006 14:38:59 GMT
Geir Magnusson Jr. wrote:
> So VMs aren't embeddable.

How so?  *Any* thread in an app can potentially call an OS's exit() and
bring down the app, so why are you distinguishing the thread that
happens to be running Java code?

> <sigh>
> Maybe we can offer a flag for people that want to truly embed the VM...

If you don't want the Java app to call System.exit() then you can set up
a security manager to prevent it.  It will then be required to unwind
nicely to get out, and the VM will terminate when there are no
non-daemon threads etc etc.



Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

View raw message