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

Method fromFuture

src/main/java/io/reactivex/rxjava3/core/Flowable.java:2300–2307  ·  view source on GitHub ↗

Converts a Future into a Publisher. The operator calls Future#get(), which is a blocking method, on the subscription thread. It is recommend

(@NonNull Future<? extends T> future)

Source from the content-addressed store, hash-verified

2298 * @see #fromCompletionStage(CompletionStage)
2299 */
2300 @CheckReturnValue
2301 @NonNull
2302 @BackpressureSupport(BackpressureKind.FULL)
2303 @SchedulerSupport(SchedulerSupport.NONE)
2304 public static <@NonNull T> Flowable<T> fromFuture(@NonNull Future<? extends T> future) {
2305 Objects.requireNonNull(future, "future is null");
2306 return RxJavaPlugins.onAssembly(new FlowableFromFuture<>(future, 0L, null));
2307 }
2308
2309 /**
2310 * Converts a {@link Future} into a {@link Publisher}, with a timeout on the {@code Future}.

Callers 13

fromFutureReturnsNullMethod · 0.95
successMethod · 0.95
failureMethod · 0.95
backpressureMethod · 0.95
withTimeoutNoTimeoutMethod · 0.95
withTimeoutTimeoutMethod · 0.95
createPublisherMethod · 0.95

Calls 1

onAssemblyMethod · 0.95

Tested by 12

fromFutureReturnsNullMethod · 0.76
successMethod · 0.76
failureMethod · 0.76
backpressureMethod · 0.76
withTimeoutNoTimeoutMethod · 0.76
withTimeoutTimeoutMethod · 0.76
createPublisherMethod · 0.76