/** * Associate the current thread with the task, or clear it in contextsInstalledByExecutor * if it has been interrupted. This should be the first thing tasks do once they run. * * @param context the context * @return true if interrupted */ synchronized boolean associateWithThreadOrDisassociateIfInterrupted(ControllerContext context) { if (interrupted) { contextsInstalledByExecutor.disassociateWithTask(context); return true; } thread = Thread.currentThread(); return false; }
contextsInstalledByExecutor.disassociateWithTask(context);
contextsInstalledByExecutor.disassociateWithTask(context);