package com.hypirion.io;

import java.io.InputStream;
import java.io.OutputStream;

public class Pipe {

    private final Thread threadPumper;
    private final PipeThread pt;
    private final InputStream in;
    private final OutputStream out;

    public Pipe(InputStream in, OutputStream out) {
        this.in = in;
        this.out = out;
        pt = new PipeThread();
        threadPumper = new Thread(pt);
        threadPumper.setName(String.format("PipeThread %s %s", in.hashCode(),
                                           out.hashCode()));
        threadPumper.setDaemon(true);
    }

    public void join() throws InterruptedException {
        threadPumper.join();
    }

    public void start() {

    }

    public void stop() {
        stop(true);
    }

    public void stop(boolean block) {

    }

    private class PipeThread implements Runnable {
        @Override
        public void run() {
            while (true) {
                
            }
        }
    }
}

@@ -239,16 +239,62 @@
 eam out;
+%0A    private final Object readLock, writeLock;
 %0A%0A    pu
@@ -624,32 +624,99 @@
 etDaemon(true);%0A
+        readLock = new Object();%0A        writeLock = new Object();%0A
     %7D%0A%0A    publi
@@ -915,24 +915,32 @@
 an block) %7B%0A
+        
 %0A    %7D%0A%0A    

Add in locks for pipe.