Better alternative for PipedReader/PipedWriter?

Posted by Esko Luontola on Stack Overflow See other posts from Stack Overflow or by Esko Luontola
Published on 2010-05-16T11:37:03Z Indexed on 2010/05/16 11:40 UTC
Read the original article Hit count: 147

Filed under:
|

I need to have a buffered char stream, into which I write in one thread and from which I read in another thread. Right now I'm using PipedReader and PipedWriter for it, but those classes cause a performance problem: PipedReader does a wait(1000) when its internal buffer is empty, which causes my application to lag visibly.

Would there be some library which does the same thing as PipedReader/PipedWriter, but with better performance? Or will I have to implement my own wheels?

© Stack Overflow or respective owner

Related posts about java

Related posts about data-structures