Thread.interrupt()
Tom Tromey
tromey@cygnus.com
Tue Mar 14 10:58:00 GMT 2000
Jeff> So the reader thread will remain blocked after close. We could
Jeff> modify close() to call lock.notifyAll(), and check the closed
Jeff> flag in read(). So at least for this class, Doug Lea's
Jeff> suggestion could probably be made to work. I don't know how
Jeff> easy it would be to implement throughout java.io however.
Jeff> Thoughts?
I agree with Hans that resource revocation is an ugly way to go. It
only works if you have a lot of knowledge of what the other thread is
doing.
Still, I think this ought to work -- that is, you found a bug in the
pipe classes. Could you send a PR and/or patch?
Tom
More information about the Java
mailing list