private void flush ( Consumer < Result > outputFn ) { Result r = results . poll ( ) ; while ( r != null ) { outputFn . accept ( r ) ; resultCount ++ ; r = results . poll ( ) ; } }
Flush pending errors and results