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

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

Introduction

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

Prototype

public void begin() 

Source Link

Usage

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

License:Open Source License

/**
 * Runs in UI thread//  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();
    }
}