code: public static <R> OnSubscribe<R> fromRunnable(final Runnable run, final R result) {
          return new InvokeAsync<R>(new Func0<R>() {
              @Override
              public R call() {
                  run.run();
                  return result;
              }
          });
      }
docs: Subscriber function that invokes a runnable and returns the given result.