Precise GC (was Re: cannot build libjava/gnu/gcj/xlib/natClip.cc)

Jeff Sturm jeff.sturm@appnet.com
Thu Jan 4 08:58:00 GMT 2001


Cedric Berger wrote:
> try {
> sql.open()
> sql.use()
> } finally {
> <<<--- For example here, A ThreadDeath() is thrown and abort the thing --->>>>
> <<<--- are you protected against that? --->>>>
> sql.close()
> }
>> The problem of ThreadDeath is that he can appends anywhere,
> anyplace, at any bytecode.

I understand your point. I'm not arguing that Thread.stop is safe. There
certainly exist applications in which I wouldn't dare invoke stop() on a random
thread. In our case I accept the risk because
1) I know what the thread is doing
2) I don't attempt to recover; my intent is to abort the thread and (hopefully)
allow other threads to continue normally
3) The app isn't mission critical; safety is valuable but not paramount.
It is very unlikely (but possible, I admit) that the unresponsive thread is
executing a finally block when I stop it. It is far more likely to just clean
up and exit. That happens to be good enough for us. (IOW our customer doesn't
pay us for more safety than that :\)
--
Jeff Sturm
jeff.sturm@commerceone.com


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /