Unblocking blocked I/O

David Vrabel dv207@hermes.cam.ac.uk
Tue Sep 18 01:33:00 GMT 2001


Hi,
I have a thread which blocks while reading from a network Socket. I need
to unblock the thread so it can see it's supposed to die (and then die
gracefully).
A search of the internet suggests that I can close the Socket (from
another thread) and then the blocked read will throw an exception (and
hence become unblocked). This does not work. The thread remains blocked
on the read.
I also tried Thread.interrupt() but that seemed completely broken.
Thanks.
David Vrabel


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /