Re: JavaMemoryModel: Minor issue on hb edges and interrupts

From: Joseph Bowbeer (jozart@blarg.net)
Date: Mon Mar 22 2004 - 02:06:30 EST


Whether it employs hb or some other means, I think the spec should clarify
the following:

1. Do the interrupt and isInterrupted methods have to do anything? (or are
they similar to yield?)

2. Can these methods move into and/or out of synchronized blocks? Can they
move across volatile accesses?

----- Original Message -----
From: "Bill Pugh" <pugh@cs.umd.edu>
To: "JSR133" <jsr-133-eg@jcp.org>; "javamemorymodel-cs.umd.edu"
<javamemorymodel@cs.umd.edu>
Sent: Wednesday, March 17, 2004 11:50 AM
Subject: JavaMemoryModel: Minor issue on hb edges and interrupts

There is a minor point that had been discussed before, but seems to have
gotten left out of the public review draft.

I am planning to add it back in:

  If thread T1 interrupts thread T2,
         there is a happens-before edge
         from the interrupted by T1
         to the point where any other thread (including T2)
          determines that T2 has been
         interrupted
         (by having an InterruptedException thrown
         or by invoking Thread.interruped or Thread.isInterrupted).

Bill

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



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