This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Thread.interrupt()


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]