Example usage for com.badlogic.gdx.utils DelayedRemovalArray end

List of usage examples for com.badlogic.gdx.utils DelayedRemovalArray end

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils DelayedRemovalArray end.

Prototype

public void end() 

Source Link

Usage

From source file:es.eucm.ead.editor.control.workers.WorkerExecutor.java

License:Open Source License

/**
 * Runs in UI thread/*from   w ww .j  a  va 2 s  .  c om*/
 */
public void act() {
    for (DelayedRemovalArray<Worker> workers : workersMap.values()) {
        workers.begin();
        for (int i = 0, n = workers.size; i < n; ++i) {
            Worker worker = workers.get(i);
            if (worker.isResultsInUIThread()) {
                worker.act();
            }
            if (worker.isDone()) {
                workers.removeIndex(i);
            }
        }
        workers.end();
    }
}