Re: Interrupting repl in Slime
Alessio Stalla <[email protected]> Thu, 7 Apr 2022 13:20:37 +0200
| Newsgroups | gmane.editors.j.devel |
|---|---|
| Message-ID | <CAL2Kp+i8as5nV4DtavBjMAkP9GRGWjkyaoa6-zNBbeC3aiKQOQ@mail.gmail.com> |
No, I mean https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#interrupted-- The only deprecated methods are suspend, resume and stop. The interrupt machinery is what developers are supposed to use (at least when not using some higher-level framework). It's a form of cooperative multitasking, since a thread can completely ignore the interrupt. However, given we have control over Lisp threads, we can play nice with that convention, and maybe offer a without-interrupts special form for performance-critical code where the developer assumes the responsibility of checking for interrupts in selected moments. On Thu, 7 Apr 2022 at 11:42, Mark Evenson <[email protected]> wrote: > > > > On Apr 7, 2022, at 08:22, Alessio Stalla <[email protected]> > wrote: > > > > […] Java threads already natively have an interrupt flag. > > Presumably, the [Thread.State enumeration] is what you are referring to. I > have checked that it is present in openjdk{8,11,17}, and not marked as > deprecated. > > [1]: https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.State.html > > -- > "A screaming comes across the sky. It has happened before but there is > nothing > to compare to it now." > > > > > >