Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4069751
Votes 2
Synopsis Specific behavior of interrupt APIs not documented
Category java:classes_lang
Reported Against 1.1 , 1.2beta2
Release Fixed 1.2(1.2fcs)
State 11-Closed, Unverified, bug
Priority: 3-Medium
Related Bugs
Submit Date 05-AUG-1997
Description
Doug Lea points out that there doesn't seem to be any place where the
precise semantics of Thread.interrupt and friends is documented.  In part
this is due to the fact that the semantics weren't really pinned down
until 1.1, and there haven't been any specs updated since then.  But we
could be promulgating the correct behavior in the javadoc comments.  I'm
reporting this against java/runtime rather than making it a doc bug because
we need to get the technical content right.

I think that the answers to Doug's questions are that all of these behaviors
are thought to be pinned down now, but just haven't been documented.

Doug's original mail:

ate: Fri, 1 Aug 1997 10:51:01 -0400


Subject: Hopefully easy questions about interrupt


I've been trying to nail down minor corner issues mentioned in
  http://gee.cs.oswego.edu/dl/cpj/cancel.html

I cannot find in JLS or 1.1 API javadocs anything that says that the
predefined methods (wait, sleep, join) that throw InterruptedException
also clear the thread's interrupted status.  They apparently do this
in 1.1.  Is this intended to be guaranteed?

But status is not automagically cleared when user-level code throws
InterruptedException; right?

Also, there isn't anything written that says that
  Thread.currentThread.isInterrupted() does NOT clear status
  Thread.interrupted()                 DOES     clear status
The 1.1 source code does it this way. Is this intended to be
guaranteed?

Am I missing where to find this information? If not could someone do
something that reminds someone to at least add this information to
javadocs? 

Thanks!

-Doug
Work Around
N/A
Evaluation
Will reassign it to java/specification

 xxxxx@xxxxx  1997-10-16

I'm reassingning this to gbracha because he's in charge of tracking these things, but I'm happy to write the text that tightens up the specs of these operations.

 xxxxx@xxxxx  1997-11-09

I'm reassigning this to me to make sure that I fix it for FCS.

 xxxxx@xxxxx  1998-06-29
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang