This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
RE: Thread.interrupt()
- To: "'Miles Sabin'" <msabin at cromwellmedia dot co dot uk>, "'java-discuss at sourceware dot cygnus dot com'" <java-discuss at sourceware dot cygnus dot com>
- Subject: RE: Thread.interrupt()
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- Date: Wed, 15 Mar 2000 13:50:51 -0800
Miles Sabin wrote:
>Boehm, Hans wrote,
>> In the case of resource invocation, there is no defined
>> protocol, and thus essentially no libraries that abide by it.
>Well, there is, sort of.
>Resource revocation implies that the current or next use of
>the resource will fail. That should result in an exception
>throw (an IOException in this particular case). In general I
>would expect well behaved libraries to respond gracefully in
>the face of such an event.
That's not the issue. The problem is that with resource revocation
there is no standard method that thread A would call to terminate B.
Equivalently, there is no protocol that would allow thread A to locate
the resource it should revoke to terminate thread B. I haven't a clue how
to terminate a thread that might hang during name lookup in a standard
library if I'm constrained to use resource revocation.
Hans