-
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
Creating toObservable for Future #109
Conversation
This code looks fine, though I'm curious about the implication of it blocking on the Future.get(). It's obviously the only way to do it without spawning another thread that blocks on that future which would take us into this conversation: #19 Is this misleading to people to think it would be asynchronous? |
@Override | ||
public Subscription call(Observer<T> observer) { | ||
try { | ||
T value = that.get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should add an overload that allows passing in the timeout values?
I've added comments inline in the code as well |
Looks good. |
Creating toObservable for Future
Creating toObservable for Future
simple wrapper that turns a future into a observable.