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

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

Introduction

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

Prototype

public T removeIndex(int index) 

Source Link

Usage

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

License:Open Source License

/**
 * Runs in UI thread/*from w w  w .j a  v a  2s  .co m*/
 */
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();
    }
}