Java 类com.badlogic.gdx.utils.async.AsyncTask 实例源码

项目:cachebox3.0    文件:CB.java   
public static void postAsync(final Runnable runnable) {
    asyncExecutor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            try {
                runnable.run();
            } catch (final Exception e) {
                // throw on main thread, async executor will catch them
                Gdx.app.postRunnable(new Runnable() {
                    @Override
                    public void run() {
                        throw e;
                    }
                });
            }
            return null;
        }
    });
}
项目:cachebox3.0    文件:Search.java   
protected void writeLogToDB(final LogEntry logEntry) {
    asyncExecutor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            logDAO.WriteToDatabase(logEntry);
            return null;
        }
    });
}
项目:gdx-kiwi    文件:AsynchronousLogger.java   
@Override
protected void logDebug(final String tag, final String message) {
    executor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            Gdx.app.debug(tag, message);
            return null;
        }
    });
}
项目:gdx-kiwi    文件:AsynchronousLogger.java   
@Override
protected void logDebug(final String tag, final String message, final Throwable exception) {
    executor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            Gdx.app.debug(tag, message, exception);
            return null;
        }
    });
}
项目:gdx-kiwi    文件:AsynchronousLogger.java   
@Override
protected void logInfo(final String tag, final String message) {
    executor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            Gdx.app.log(tag, message);
            return null;
        }
    });
}
项目:gdx-kiwi    文件:AsynchronousLogger.java   
@Override
protected void logInfo(final String tag, final String message, final Throwable exception) {
    executor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            Gdx.app.log(tag, message, exception);
            return null;
        }
    });
}
项目:gdx-kiwi    文件:AsynchronousLogger.java   
@Override
protected void logError(final String tag, final String message) {
    executor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            Gdx.app.error(tag, message);
            return null;
        }
    });
}
项目:gdx-kiwi    文件:AsynchronousLogger.java   
@Override
protected void logError(final String tag, final String message, final Throwable exception) {
    executor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            Gdx.app.error(tag, message, exception);
            return null;
        }
    });
}
项目:gdx-lml    文件:AsynchronousLogger.java   
@Override
protected void logDebug(final String tag, final String message) {
    executor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            Gdx.app.debug(tag, message);
            return null;
        }
    });
}
项目:gdx-lml    文件:AsynchronousLogger.java   
@Override
protected void logDebug(final String tag, final String message, final Throwable exception) {
    executor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            Gdx.app.debug(tag, message, exception);
            return null;
        }
    });
}
项目:gdx-lml    文件:AsynchronousLogger.java   
@Override
protected void logInfo(final String tag, final String message) {
    executor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            Gdx.app.log(tag, message);
            return null;
        }
    });
}
项目:gdx-lml    文件:AsynchronousLogger.java   
@Override
protected void logInfo(final String tag, final String message, final Throwable exception) {
    executor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            Gdx.app.log(tag, message, exception);
            return null;
        }
    });
}
项目:gdx-lml    文件:AsynchronousLogger.java   
@Override
protected void logError(final String tag, final String message) {
    executor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            Gdx.app.error(tag, message);
            return null;
        }
    });
}
项目:gdx-lml    文件:AsynchronousLogger.java   
@Override
protected void logError(final String tag, final String message, final Throwable exception) {
    executor.submit(new AsyncTask<Void>() {
        @Override
        public Void call() throws Exception {
            Gdx.app.error(tag, message, exception);
            return null;
        }
    });
}