Skip to content
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

Make AbstractCommand.toObservable lazy. #1274

Merged
merged 1 commit into from
Jul 10, 2016

Conversation

mattrjacobs
Copy link
Contributor

@mattrjacobs mattrjacobs commented Jul 10, 2016

Prevents work (like cache key calculation) from happening before subscription

  • This also implies that queue()/observe() will not throw anymore
  • The IllegalStateException now gets wrapped in a HystrixRuntimeException

…om happening before subscription

* This also implies that queue()/observe() will not throw anymore
* The IllegalStateException now gets wrapped in a HystrixRuntimeException for consistency
@mattrjacobs
Copy link
Contributor Author

/cc @stevegury @robertroeser @NiteshKant Thoughts on this?

@NiteshKant
Copy link

I am not familiar with the code but conceptually wrapping it in .defer() makes sense for lazy method toObservable()

@mattrjacobs mattrjacobs merged commit c45c208 into Netflix:master Jul 10, 2016
@mattrjacobs mattrjacobs deleted the wrap-everything-in-defer branch July 10, 2016 14:48
@mattrjacobs mattrjacobs changed the title Make toObservable lazy. Make AbstractCommand.toObservable lazy. Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants