public void join_pipes() {
        try {
            for (Thread t : threads) {
                t.join();
            }
        } catch (InterruptedException e) {
            setException(e);
        }
    }