Expected behaviour: sun.nio.ch.PipeImpl uses anonymous pipes, i.e. CreatePipe and related functions, to create pipes on Microsoft Windows.
Actual behaviour: sun.nio.ch.PipeImpl loopback TCP/IP connections to create pipes. Therefore the number of pipes is less or equal to the size of the dynamic port range and due to RFC 6335 limited to a maximum of 8191 pipes (two ports per pipe) for the entire system (not accounting for any other uses of the ports). Modern computers can handle more threads than this limit if the threads use selectors or pipes, the limit of pipes is also the limit of threads and selectors of the entire system. Suggested fix: sun.nio.ch.PipeImpl should use anonymous pipe. It seems that supported versions of Microsoft Windows can create millions of handles and is not limited to the dynamic port range.