public void invoke() {
        try {
            final V tmpResult = callable.call();

            stateLock.lock();
            try {
                result = tmpResult;
                finished = true;

                finishedCondition.signalAll();
            } finally {
                stateLock.unlock();
            }
        } catch (Exception e) {
            logger.logp(Level.SEVERE, this.getClass().toString(), "invoke()", "Exception", e);

            stateLock.lock();
            try {
                exception = new ExecutionException(e);

                finishedCondition.signalAll();
            } 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