public void waitFor ( ) { try { synchronized ( lock ) { if ( ! end ) { lock . wait ( ) ; } } } catch ( InterruptedException ignore ) { Thread . currentThread ( ) . interrupt ( ) ; } }
Waits for gobbler to end .