Re: JavaMemoryModel: Minor issue on hb edges and interrupts

From: Bill Pugh (
Date: Wed Mar 17 2004 - 21:28:14 EST

On Mar 17, 2004, at 5:33 PM, David Holmes wrote:
> I'm not sure I agree that this is necessary - or necessarily a good
> thing.
> The interrupt tells the thread to wakeup. Once the thread wakes up any
> access to data shared between the interruptor and interruptee should be
> correctly synchronized as normal.
> What you are proposing essentially amounts to making the "interrupted"
> "field" of a thread behave as a volatile - right?

Yes. The idea is that someone might do something like

* Interrupter thread
   - store some data as to why the thread is being interrupted
   - interrupt the thread

* Interupted thread
   - receive interrupt
   - look at data explaining why it was interrupted.

In general, I think any way of reliably communicating between threads
induce a happens-before edge. Certainly, I think programmers may expect
that something
like the above is reasonable.

JavaMemoryModel mailing list -

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