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

Add which are the other stardard methods of create #5000

Merged
merged 1 commit into from
Jan 17, 2017
Merged

Add which are the other stardard methods of create #5000

merged 1 commit into from
Jan 17, 2017

Conversation

BraisGabin
Copy link
Contributor

I was using Observable.create(OnSubscribe). I knew about the warning:

This method requires advanced knowledge about building operators and data sources; please consider other standard methods first

But I didn't know which were the other stadard methods. There were no clue in the JavaDoc. With this change the problem is gone.

@@ -63,7 +63,7 @@ protected Observable(OnSubscribe<T> f) {

/**
* <strong>This method requires advanced knowledge about building operators and data sources; please consider
* other standard methods first;</strong>
* other standard methods first, as {@link Observable#fromEmitter(Action1, Emitter.BackpressureMode)};</strong>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

such as

@akarnokd
Copy link
Member

But I didn't know which were the other stadard methods

I accept this change but developers should really spend time discovering the methods of RxJava for themselves. Otherwise we'd have 30k lines in Observable.java just to link and explain correlated methods.

@akarnokd akarnokd added this to the 1.3 milestone Jan 17, 2017
@codecov-io
Copy link

codecov-io commented Jan 17, 2017

Current coverage is 84.20% (diff: 100%)

Merging #5000 into 1.x will decrease coverage by 0.07%

@@                1.x      #5000   diff @@
==========================================
  Files           288        288          
  Lines         17806      17806          
  Methods           0          0          
  Messages          0          0          
  Branches       2698       2698          
==========================================
- Hits          15007      14994    -13   
- Misses         1950       1956     +6   
- Partials        849        856     +7   

Powered by Codecov. Last update 3716747...88b8730

@BraisGabin
Copy link
Contributor Author

Updated.

I understand your concerns about the lenght of this file. But there's too much noise on internet about this method: posts, tutorials, gists...

@akarnokd akarnokd merged commit 9f02563 into ReactiveX:1.x Jan 17, 2017
@DavidMGross
Copy link
Collaborator

DavidMGross commented Jan 17, 2017 via email

@BraisGabin
Copy link
Contributor Author

I know... and this is all the information that I can find there:

RxJava implements this operator as create.

It is good practice to check the observer’s isUnsubscribed state from within the function you pass to create so that your Observable can stop emitting items or doing expensive calculations when there is no longer an interested observer.

Nothing about fromEmitter, the other overloads of create or the advance usage of create(OnSubscribe)... An update there would be great too. But I don't how to contribute there.

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.

None yet

4 participants