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

Safer error handling in BlockingOperatorToFuture #3361

Conversation

artem-zinnatullin
Copy link
Contributor

Not very important since onError should be called once, but anyway it's AtomicReference and we need to store the value returned from get() locally.

P.S. I don't use Futures, just found this piece of code.

@akarnokd
Copy link
Member

It is unlikely error changed between the two calls in this operator but regardless, one should read volatile variables once. 👍

@abersnaze
Copy link
Contributor

👍

abersnaze added a commit that referenced this pull request Oct 7, 2015
…tter-error-handling

Safer error handling in BlockingOperatorToFuture
@abersnaze abersnaze merged commit aed1186 into ReactiveX:1.x Oct 7, 2015
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

3 participants