3 ms·
How do you get a thread's PID in Java/on the JVM? Regardless, the deprecation serves as prominent warning that the programmer is about to shoot themselves in t
by lomnakkus 8y ago
How do you get a thread's PID in Java/on the JVM?
Regardless, the deprecation serves as prominent warning that the programmer is about to shoot themselves in the foot.
(I'm actually more surprised that stop() hasn't been removed after all this time.)
- derefr 8y agoOn a Java Card or other JVM-unikernel device, Thread.stop() would be the only way for a system watchdog process (e.g. an OOM killer) to be implemented.
- smarks 8y agoThere are narrow and unsafe uses of the no-arg Thread.stop() overload so it remains in the platform, although deprecated. There is an overload Thread.stop(Throwable) that is deprecated “for removal”. It’s been a no-op for several releases and the API will eventually be removed entirely.