MCPcopy Index your code
hub / github.com/ReactiveX/RxJava / fromFuture

Method fromFuture

src/main/java/io/reactivex/rxjava3/core/Single.java:1019–1024  ·  view source on GitHub ↗

Converts a Future into a Single and awaits its outcome in a blocking fashion. The operator calls Future#get(), which is a blocking me

(@NonNull Future<? extends T> future)

Source from the content-addressed store, hash-verified

1017 * @see #fromCompletionStage(CompletionStage)
1018 */
1019 @CheckReturnValue
1020 @SchedulerSupport(SchedulerSupport.NONE)
1021 @NonNull
1022 public static <@NonNull T> Single<T> fromFuture(@NonNull Future<? extends T> future) {
1023 return toSingle(Flowable.fromFuture(future));
1024 }
1025
1026 /**
1027 * Converts a {@link Future} into a {@code Single} and awaits its outcome, or timeout, in a blocking fashion.

Callers 4

fromFutureMethod · 0.95
fromFutureTimeoutMethod · 0.95
fromFutureReturnsNullMethod · 0.95

Calls 2

toSingleMethod · 0.95
fromFutureMethod · 0.95

Tested by 4

fromFutureMethod · 0.76
fromFutureTimeoutMethod · 0.76
fromFutureReturnsNullMethod · 0.76