OSDN Git Service

Cleaning up PipedInputStream.
authorJesse Wilson <jessewilson@google.com>
Mon, 21 Sep 2009 23:54:54 +0000 (16:54 -0700)
committerJesse Wilson <jessewilson@google.com>
Tue, 22 Sep 2009 01:37:42 +0000 (18:37 -0700)
commit84ac2580412b4a4c8e705ce5b2fa33dc057aea87
treee3af9c7005307495b55404fe7065f89167b1a485
parent4d2cec327c91304574dd15bdb15d1f5c6c6b1c7a
Cleaning up PipedInputStream.

In particular, fixing a problem where the reader thread fails
as soon as the writer thread exists, even if there is data left
for the reader thread to read. Similarly, the writer fails fast
even when the buffer has space remaining.

Also fixing some concurrency issues by making readers and writers
release each other more aggressively.
libcore/luni/src/main/java/java/io/PipedInputStream.java