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)
| 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}. |