A lightweight thread is a Thread

David Lloyd david.lloyd at redhat.com
Wed Oct 23 19:29:02 UTC 2019


On Wed, Oct 23, 2019 at 12:38 PM Andrew Haley <aph at redhat.com> wrote:
> On 10/23/19 1:49 PM, David Lloyd wrote:
> > there are a couple things we can only do by subclassing Thread.  In
> > JBoss EAP and WildFly, we support custom interrupt handlers (this is
> > something that is in the JDK but is not public, thus subclassing
> > Thread is the only way to do it) and interrupt deferral (only Thread
> > subclasses can do this).
>
> I don't know how much of this will be supported by lightweight
> threads. I could guess but I'll leave that to the people involved.

Alan, did you have any thoughts about how thread interruption might
work with lightweight threads?  I imagine that it wouldn't have to be
too terribly different in a lightweight thread compared to "normal"
threads, but I'm thinking that there is definitely a scheduling effect
as interrupt tends to imply a wakeup/unpark in most if not all cases,
and there is also a question of whether or how an LWT (to attempt to
coin an abbreviation) interrupt would propagate to its scheduling
thread (and in whatever way that relationship is defined to work).

-- 
- DML


More information about the loom-dev mailing list