RE: JavaMemoryModel: Minor issue on hb edges and interrupts

From: David Holmes (dholmes@dltech.com.au)
Date: Wed Mar 17 2004 - 21:42:55 EST


> 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
> should induce a happens-before edge. Certainly, I think programmers may
expect
> that something like the above is reasonable.

I disagree - the shared data should be properly synchronized just like any
other shared data. Building this into the interrupt mechanics just seem
unnecessary and the implicit synchronization can make code more obscure
(consider a tool that watches for unsynchronized access - now they have to
take into account use of the interrupt calls - yuck!).

David Holmes

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



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