I just discovered that just has an NIO facility, Java NIO Pipe that\'s designed for passing data between threads. Is there any advantage of using this mechanism over the more co
I suppose the pipe will have better latency as it could very likely be implemented with coroutines behind the scenes. Thus, the producer immediately yields to the consumer when data is available, not when the thread scheduler decides.
Pipes in general represent a consumer-producer problem and are very likely to be implemented this way so that both threads cooperate and are not preempted externally.