question: private void emitUntil ( @ Nonnegative int taskCountAllowed ) throws IOException { try { while ( emitQueue . size ( ) > taskCountAllowed ) { Future < byte [ ] > future = emitQueue . remove ( ) ; byte [ ] toWrite = future . get ( ) ; blockSizes . add ( toWrite . length ) ; out . write ( toWrite ) ; } tryEmit ( ) ; } catch ( ExecutionException e ) { throw new IOException ( e ) ; } catch ( InterruptedException e ) { throw new InterruptedIOException ( ) ; } }
target:  Emits any opportunistically available blocks. Furthermore, emits blocks until the number of executing tasks is less than taskCountAllowed. 