code: public <T> RPromise<T> deferredPromise () {
      return new RPromise<T>() {
        @Override public void succeed (final T value) {
          invokeLater(new Runnable() {
            public void run () { superSucceed(value); }
          });
        }
        @Override public void fail (final Throwable cause) {
          invokeLater(new Runnable() {
            public void run () { superFail(cause); }
          });
        }
        private void superSucceed (T value) { super.succeed(value); }
        private void superFail (Throwable cause) { super.fail(cause); }
      };
    }
docs: Creates a promise which defers notification of success or failure to the game thread,
  regardless of what thread on which it is completed. Note that even if it is completed on the
  game thread, it will still defer completion until the next frame.