The referenced forum post identifies some shortcomings in thread handling when using NIO. To address these issues, we should consider
- Allowing the pool-size to take the form "n-m" to support a variable pool instead of the current fixed pool.
- Exposing an attribute to allow setting the PipedInputStream's buffer size in order to avoid reader threads blocking when large data is received and no consumer thread is available.
- Changing the reader thread to be cognizant of the available bytes in the piped stream and time out if space is not made available in a reasonable time.