On Mon, 23 Nov 1998 08:45:29 -0500 (EST), Nelson Minar wrote:

>>The whole Thread.stop() thing is very nasty in non-green-thread
>>systems. The core OS may not support the needed mechanisms to cleanly
>>stop a thread at various points (such as during a blocked I/O)
>
>URGH! So the entire Java language is weakened to support OSes with
>poor threading support. Even *after* we have a library, green threads,
>that lets you work around bad threading in the OS?
>
>Not being able to stop a thread preemptively is a really big problem.
>How do you stop an applet in a browser that happens to be buggy or
>malicious and has spun off in a tight loop?

That is less of a problem - If you are killing a rouge applet/process
you just do that.  That is, you kill it without reguard.

However, it is nearly impossible to make the language cleanly support
an arbitrary "stop" of a thread.  The code that is being stopped needs
to know and, maybe do some cleanup or other very important work.

It is much the same reason as you have interrupt disable in the CPU.
There are times you really do not want to be interrupted.  And it is
also why most systems really do not like using the NMI (non-maskable
interrupt) since it tends to make it impossible to know for sure that
the system will be reliable then.

Michael Sinz -- Director of Research & Development, NextBus Inc.
mailto:[EMAIL PROTECTED] --------- http://www.nextbus.com
My place on the web ---> http://www.users.fast.net/~michael_sinz

Reply via email to