@Override
    protected void controlUpdate(float tpf) {
        AppTask<?> task = taskQueue.poll();
        toploop: do {
            if (task == null) break;
            while (task.isCancelled()) {
                task = taskQueue.poll();
                if (task == null) break toploop;
            }
            task.invoke();
        } while (((task = taskQueue.poll()) != null));
    }
Enqueues a task/callable object to execute in the jME3
rendering thread.

@param <V> type of result returned by the Callable
@param callable the Callable to run
@return a new instance
jme3-core/src/main/java/com/jme3/scene/control/UpdateControl.java