-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Operators: startFuture (StartAsync) and deferFuture (DeferAsync) #645
Conversation
RxJava-pull-requests #577 SUCCESS |
RxJava-pull-requests #579 FAILURE |
RxJava-pull-requests #580 SUCCESS |
Could someone give me a summary of the differences between the following fromFuture( Future ) On Fri, Dec 20, 2013 at 6:29 AM, CloudBees pull request builder plugin <
David M. Gross |
from(Future) synchronously awaits the completion of the Future while in the subscribe method Future f = ...
from(f).subscribe(observer);
// we get here only if f has completed subsequent subscriptions will immediately receive the output of f. startFuture(Func<Future<T>>) It immediately calls the factory function and and returns the Observable of the call to fromFuture(Func<Future<T>>) This defers the factory function call into the subscription phase so practically every subscribing observer will get a "fresh" future. So they are basically linked as:
Hope this helps. |
Hmmm... okay. I think I understand that, but now I'm confused at the On Fri, Dec 20, 2013 at 12:51 PM, akarnokd [email protected] wrote:
David M. Gross |
This is where it becomes full circle. The factory returns a future which returns an observable sequence that is relayed to the subscriber.
Where merge is used because from returns an observable of observable of T. |
Ahhh... I think I'm beginning to see the light. On Fri, Dec 20, 2013 at 4:36 PM, akarnokd [email protected] wrote:
David M. Gross |
Speaking with @headinthebox the history of these from Rx.Net is to support integration with async/await which Java does not have. Thus it does not seem appropriate to implement them for Java. Anytime this functionality is needed it is trivial to do inside Can you provide reasons to add these other than matching Rx.Net? If it's only to match Rx.Net then we will pass on them. They greatly complicate the API and have easier solutions by using the |
I can't be sure how much legacy code with Futures are out there that could be interfaced with RxJava this way. So can't give a definite reason. Maybe this and other unwanted operators could be moved under the contribution section? |
Home for async utility functions with juc.Future, Actions, Functions etc that don’t need to be in rxjava-core. As per discussions at: - ReactiveX#646 (comment) - ReactiveX#645 (comment) - ReactiveX#622 (comment)
Merge these into #696 instead. |
Home for async utility functions with juc.Future, Actions, Functions etc that don’t need to be in rxjava-core. As per discussions at: - ReactiveX#646 (comment) - ReactiveX#645 (comment) - ReactiveX#622 (comment)
Home for async utility functions with juc.Future, Actions, Functions etc that don’t need to be in rxjava-core. As per discussions at: - ReactiveX#646 (comment) - ReactiveX#645 (comment) - ReactiveX#622 (comment)
Home for async utility functions with juc.Future, Actions, Functions etc that don’t need to be in rxjava-core. As per discussions at: - ReactiveX#646 (comment) - ReactiveX#645 (comment) - ReactiveX#622 (comment)
Home for async utility functions with juc.Future, Actions, Functions etc that don’t need to be in rxjava-core. As per discussions at: - ReactiveX#646 (comment) - ReactiveX#645 (comment) - ReactiveX#622 (comment)
Home for async utility functions with juc.Future, Actions, Functions etc that don’t need to be in rxjava-core. As per discussions at: - ReactiveX#646 (comment) - ReactiveX#645 (comment) - ReactiveX#622 (comment)
Home for async utility functions with juc.Future, Actions, Functions etc that don’t need to be in rxjava-core. As per discussions at: - ReactiveX/RxJava#646 (comment) - ReactiveX/RxJava#645 (comment) - ReactiveX/RxJava#622 (comment)
Issue #634
They are basically 1-2 layer deep indirections around Futures and Observables.