nrepl

pez 2023-12-17T10:50:29.980689Z

Does anyone have a way to start an evaluation that will need Thread.stop() to interrupt? I’m looking at how to improve the feedback in Calva when people run into the problem that the interrupt op stops being as effective in JDK20+ https://github.com/BetterThanTomorrow/calva/issues/2324

pez 2024-01-03T16:45:01.949399Z

Nevertheless I failed to figure out a reproduction. 😃 Things I tried were always interruptible.

bozhidar 2024-01-12T07:38:42.387629Z

Perhaps some heavy computation?

bozhidar 2023-12-23T14:18:43.097799Z

I think pretty much nothing can be interrupted, unless it was designed to be "interrupt"-friendly.

bozhidar 2023-12-23T14:19:48.616029Z

See https://stackoverflow.com/a/3590010/291550

bozhidar 2023-12-23T14:19:57.308759Z

> If the targeted thread has been waiting (by calling wait(), or some other related methods that essentially do the same thing, such as sleep()), it will be interrupted, meaning that it stops waiting for what it was waiting for and receives an InterruptedException instead.

bozhidar 2023-12-23T14:20:34.001449Z

That's why I think you can just issue a blanked warning that interrupt probably doesn't work on Java 20+.

borkdude 2023-12-17T10:51:13.775889Z

Btw, this doesn't affect bb too, since Thread.stop was never supported in native-image from the beginning

pez 2023-12-17T10:52:44.983619Z

Thanks. Will update.