in spring-taskqueue/src/main/java/org/apache/archiva/components/taskqueue/execution/ThreadedTaskQueueExecutor.java [267:289]
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;
}