in spring-taskqueue/src/main/java/org/apache/archiva/redback/components/taskqueue/execution/ThreadedTaskQueueExecutor.java [239:261]
public synchronized boolean cancelTask( Task task )
{
if ( !task.equals( currentTask ) )
{
logger.debug( "Not cancelling task - it is not running" );
return false;
}
if ( command != SHUTDOWN )
{
logger.debug( "Signalling executor thread to cancel task" );
command = CANCEL_TASK;
interrupt();
}
else
{
logger.debug( "Executor thread already stopping; task will be cancelled automatically" );
}
return true;
}