4 ms·
I am surprised that you had to go out of your way to remove Thread.stop from existing Java code. It's been deprecated since 1998, and the javadoc page explains
by teraflop 6mo ago
I am surprised that you had to go out of your way to remove Thread.stop from existing Java code. It's been deprecated since 1998, and the javadoc page explains pretty clearly why it's inherently unsafe.
It's hard to miss all the warnings unless you're literally just looking at the method name and nothing else.
- pjc50 6mo agoI was certainly surprised to see it when I found it.
- wiseowise 6mo agoThat’s barely-junior interview question indeed.
- AtlasBarfed 6mo agoOne of Java's the ecosystem fundamental platforms is that it's multi-threading. It's gone through too many models. And since Java has a metric ton of blog posts from the 2000s and 2010s, a lot of search engines lead you to older models.java itself has gone from green threads to OS threads and back to green threads now.
- DonHopkins 6mo agoWrite one, stop anywhere.
- kelnos 6mo agoNot to mention that I feel like it's pretty unusual to be creating and managing threads yourself in Java these days, instead of using a thread pool/executor.