boolean interrupted = Thread.currentThread().isInterrupted(); if (interrupted) { cleanUp(); } return interrupted;