All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.badlogic.gdx.utils.async.AsyncExecutorEmu Maven / Gradle / Ivy

There is a newer version: 1.0.4
Show newest version
package com.badlogic.gdx.utils.async;

import com.badlogic.gdx.utils.Disposable;
import com.badlogic.gdx.utils.GdxRuntimeException;
import com.github.xpenatan.gdx.backends.teavm.gen.Emulate;

@Emulate(AsyncExecutor.class)
public class AsyncExecutorEmu implements Disposable {

    public AsyncExecutorEmu(int maxConcurrent) {
    }

    public AsyncExecutorEmu(int maxConcurrent, String name) {
    }

    public  AsyncResultEmu submit(final AsyncTaskEmu task) {
        T result = null;
        try {
            result = task.call();
        }
        catch(Throwable t) {
            throw new GdxRuntimeException("Could not submit AsyncTask: " + t.getMessage(), t);
        }
        return new AsyncResultEmu(result);
    }

    @Override
    public void dispose() {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy