Thread.strop removed: how to deal with a rogue ScriptEngine thread?
fanf42 at gmail.com
Mon Jul 23 13:40:36 UTC 2018
On 23/07/2018 15:26, Alan Bateman wrote:
> On 23/07/2018 13:55, Francois wrote:
>> I'm not sure at all it is the correct mailing list for that, so sorry
>> if it is not, and please let me know where I should post my concerns.
>> So, in JDK 11, the long term deprecated Thread.stop() will is removed
>> (https://bugs.openjdk.java.net/browse/JDK-8204243), and I have an use
>> case that I don't know how to deal with afterwards.
> Have you been using stop(Throwable) or the no-arg stop() ? The method
> that is removed is stop(Throwable). This method was re-specified to
> throw UnsupportedOperationException in Java SE 8 so it seems unlikely
> that there is code running on JDK 8 or newer that relies on this method.
> I realize this isn't answering your question on how to deal with
> looping threads but I think it's important to understand that the
> removed method has been crippled for several releases and removing it
> in 11 should not be disruptive.
Oh, thank you! I misread the ticket and missed the fact that it was only
stop(Throwable) that was removed. I don't use that one, but .stop() (no
arg). So it's a relief, even if I don't have answer now, at least I
don't have a ticking bomb to deal with :)
Thank you very much!
(And I'm still interested by a general, clean and supported solution to
deal with the described problem).
Francois ARMAND - @fanf42
More information about the discuss