Re: JavaMemoryModel: Thread model algorithm.

From: Doug Lea (
Date: Mon Nov 17 2003 - 20:20:07 EST

> So the only tangible benefit of attaching a higher priority to interrupt()
> is that the programmer who is concerned to get maximally fast response to
> interrupt() (and doesn't care about lost notifications) does not have to add
> if(Thread.interrupted()) throw InterruptedException;
> immediately after the call to wait.

OK, but:

  1. Anyone dealing with cancellation will find that they need to do this.
  2. I don't know of a use case where anyone needs to know whether a
     thread was notified before it was interrupted.

Do you disagree?
Or do you agree but still think we should adopt the simpler-looking spec?


JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:54 EDT