public void serve() {
        if (preSubmitted.isEmpty() && activeEngines.isEmpty()) {
            return;
        }
        if (!preSubmitted.isEmpty()) {
            Iterator<Engine> it = preSubmitted.iterator();
            while (it.hasNext()) {
                Engine engine = it.next();
                if (!engine.isRunning()) {
                    engine.setRunning(true);
                    activeEngines.add(engine);
                    engine.fire();

                } else {
                    activeEngines.add(engine);
                }
                it.remove();
            }
        }
        Iterator<Engine> it2 = activeEngines.iterator();
        while (it2.hasNext()) {
            Engine engine = it2.next();
            if (activeEngines.isEmpty()) {
                return;
            }
            if (!engine.isRunning()) {
                it2.remove();
                engine = null;
            }
        }
    }