This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Unblocking blocked I/O
- To: <java at gcc dot gnu dot org>
- Subject: Re: Unblocking blocked I/O
- From: David Vrabel <dv207 at hermes dot cam dot ac dot uk>
- Date: Wed, 19 Sep 2001 15:30:42 +0100 (BST)
On Tue, 18 Sep 2001, David Vrabel wrote:
> 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).
The java script in Sun's jdk 1.3.1 has this to say:
"# bug #4344135 workaround
# A thread currently waiting on a I/O operation will not wake up if one
# of the files involved is actually closed (last close - the file is
# no longer accessible but the thread is still waiting in the kernel).
# The library libpreemptive_close.so is dynamically linked to the JVM"
Is this helpful? I'm guessing that libpreemtive_close.so provides
replacement read() and close() etc. Perhaps (really wild guess) the
replacement read() sets a flag when entered (and unsets it on exit) and
the close() signals the thread if the flag is set? This would unblock the
read() right?
David Vrabel