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

Fixed issue #417 #453

Merged
merged 1 commit into from
Oct 31, 2013
Merged

Fixed issue #417 #453

merged 1 commit into from
Oct 31, 2013

Conversation

zsxwing
Copy link
Member

@zsxwing zsxwing commented Oct 25, 2013

public static void main(String[] args) {
    System.out.println("started");
    System.out.println(Observable.from(1).observeOn(Schedulers.threadPoolForComputation())
        .map(f).toBlockingObservable().single());
    System.out.println("done");
}

This issue in #417 is because current map implementation violates the design guild:

6.4. Protect calls to user code from within an operator

Now current map does not handle the error from the func param which may be user codes. When the thread pool scheduler is involved, the error from func will throw to the outside and be handled by java.util.concurrent.FutureTask. The error will be dropped so the observer will not see it.

This PR used SafeObserver to protect map from user codes.

@cloudbees-pull-request-builder

RxJava-pull-requests #372 FAILURE
Looks like there's a problem with this pull request

benjchristensen added a commit that referenced this pull request Oct 31, 2013
@benjchristensen benjchristensen merged commit 5ca9c1c into ReactiveX:master Oct 31, 2013
@benjchristensen
Copy link
Member

Thank you @zsxwing

@zsxwing zsxwing deleted the issue-417 branch November 1, 2013 01:53
rickbw pushed a commit to rickbw/RxJava that referenced this pull request Jan 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants