public void stop ( ) { AsyncWork < Integer , IOException > currentRead = readTask ; if ( currentRead != null && ! currentRead . isUnblocked ( ) ) { currentRead . cancel ( new CancelException ( "SimpleBufferedReadable.stop" ) ) ; currentRead . block ( 0 ) ; } }
Stop any pending read and block until they are cancelled or done .