public final void listenInline ( AsyncWorkListener < T , TError > listener ) { synchronized ( this ) { if ( ! unblocked || listenersInline != null ) { if ( listenersInline == null ) listenersInline = new ArrayList <> ( 5 ) ; listenersInline . add ( listener ) ; return ; } } if ( error != null ) listener . error ( error ) ; else if ( cancel != null ) listener . cancelled ( cancel ) ; else listener . ready ( result ) ; }
Add a listener to be called when this AsyncWork is unblocked .