curBatch.process(); else { lock.lock();
curBatch.process(); else { lock.lock();
/** {@inheritDoc} */ @Override protected void cleanup() { assert cancelled; // Cleanup can only be performed on a cancelled worker. // Clear interrupted flag. boolean interrupted = interrupted(); // Process the last batch if any. if (nextBatch != null) nextBatch.process(); onFinish(); // Reset interrupted flag. if (interrupted) interrupt(); }
/** {@inheritDoc} */ @Override protected void cleanup() { assert cancelled; // Cleanup can only be performed on a cancelled worker. // Clear interrupted flag. boolean interrupted = interrupted(); // Process the last batch if any. if (nextBatch != null) nextBatch.process(); onFinish(); // Reset interrupted flag. if (interrupted) interrupt(); }