Why doesn't more Java code use PipedInputStream / PipedOutputStream?

前端 未结 9 2140
感动是毒
感动是毒 2020-12-02 12:56

I\'ve discovered this idiom recently, and I am wondering if there is something I am missing. I\'ve never seen it used. Nearly all Java code I\'ve worked with in the wild fav

9条回答
  •  青春惊慌失措
    2020-12-02 13:48

    PipedInputStream and PipeOutputStream will sleep its thread for 1 second whenever they are blocking waiting for the other side to read or write out of the full or empty buffer. Do not use.

提交回复
热议问题