Why is the receiver thread not receiving anything in my Java piped streaming program? [duplicate]
问题 This question already has answers here : Why are empty catch blocks a bad idea? [closed] (20 answers) Closed 2 years ago . I have 3 very small classes. The main class: import java.io.*; public class ConnectionManager { public static void main(String argv[]) { try { PipedOutputStream pout = new PipedOutputStream(); PipedInputStream pin = new PipedInputStream(pout); Sender s = new Sender(pout, true); Receiver r = new Receiver(pin, true); System.out.println("Starting threads"); s.start(); r