@Override
    public boolean cancel(boolean mayInterruptIfRunning) {
        stateLock.lock();
        try {
            if (result != null) {
                return false;
            }
            cancelled = true;

            finishedCondition.signalAll();

            return true;
        } finally {
            stateLock.unlock();
        }
    }
Create an <code>AppTask</code> that will execute the given 
{@link Callable}.

@param callable The callable to be executed
jme3-core/src/main/java/com/jme3/app/AppTask.java