public void run () { while (true) { synchronized (threadLock) { if (thread != this || files != Gdx.files) break; long waitMillis = 5000; if (pauseMillis == 0) { long timeMillis = System.nanoTime() / 1000000; for (int i = 0, n = instances.size; i < n; i++) { try { waitMillis = instances.get(i).update(timeMillis, waitMillis); } catch (Throwable ex) { throw new GdxRuntimeException("Task failed: " + instances.get(i).getClass().getName(), ex); } } } if (thread != this || files != Gdx.files) break; try { if (waitMillis > 0) threadLock.wait(waitMillis); } catch (InterruptedException ignored) { } } } dispose(); }
public void run () { while (true) { synchronized (threadLock) { if (thread != this || files != Gdx.files) break; long waitMillis = 5000; if (pauseMillis == 0) { long timeMillis = System.nanoTime() / 1000000; for (int i = 0, n = instances.size; i < n; i++) { try { waitMillis = instances.get(i).update(timeMillis, waitMillis); } catch (Throwable ex) { throw new GdxRuntimeException("Task failed: " + instances.get(i).getClass().getName(), ex); } } } if (thread != this || files != Gdx.files) break; try { if (waitMillis > 0) threadLock.wait(waitMillis); } catch (InterruptedException ignored) { } } } dispose(); }
public void run () { while (true) { synchronized (threadLock) { if (thread != this || files != Gdx.files) break; long waitMillis = 5000; if (pauseMillis == 0) { long timeMillis = System.nanoTime() / 1000000; for (int i = 0, n = instances.size; i < n; i++) { try { waitMillis = instances.get(i).update(timeMillis, waitMillis); } catch (Throwable ex) { throw new GdxRuntimeException("Task failed: " + instances.get(i).getClass().getName(), ex); } } } if (thread != this || files != Gdx.files) break; try { if (waitMillis > 0) threadLock.wait(waitMillis); } catch (InterruptedException ignored) { } } } dispose(); }