Time to put a stop to Thread.stop? (original) (raw)
Martin Buchholz martinrb at google.com
Tue May 14 16:57:27 UTC 2013
- Previous message: Time to put a stop to Thread.stop?
- Next message: Time to put a stop to Thread.stop?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, May 14, 2013 at 7:45 AM, Jeroen Frijters <jeroen at sumatra.nl> wrote:
IMO Thread.currentThread().stop(new Throwable()) should continue to work. It is not unsafe and it is probably used in a lot of code to workaround the madness that is checked exceptions.
There are existing JDK tests that use currentThread().stop to implement the occasionally necessary sneakyThrow.
I suspect there are important uses of unsafe otherThread.stop in the real world, where it is used as a last resort to shut down an "application" running within a java vm, and works reasonably well in practice.
- Previous message: Time to put a stop to Thread.stop?
- Next message: Time to put a stop to Thread.stop?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]