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

2.x: fix publish(Function) not replenishing its queue #4943

Merged
merged 1 commit into from
Dec 29, 2016

Conversation

akarnokd
Copy link
Member

I was working on converting the Monte Carlo PI benchmark to RxJava 2 and it turned out I forgot to replenish the internal queue of publish(Function) in case the upstream was not sync-fuseable.

This PR fixes the replenishment problem for non-fused and async-fused sources by requesting after 75% consumption.

In addition, if an inner subscriber cancelled while it was at request 0, the other inner subscribers might not have resumed draining.

I've also fixed two unit tests with wrong timeout unit of measure that randomly failed the tests on a slow machine or travis (#4902).

@codecov-io
Copy link

Current coverage is 95.50% (diff: 100%)

Merging #4943 into 2.x will decrease coverage by 0.11%

@@                2.x      #4943   diff @@
==========================================
  Files           587        587          
  Lines         37540      37549     +9   
  Methods           0          0          
  Messages          0          0          
  Branches       5652       5655     +3   
==========================================
- Hits          35896      35863    -33   
- Misses          694        723    +29   
- Partials        950        963    +13   

Powered by Codecov. Last update 4851637...f5f753c

@akarnokd akarnokd merged commit a9f1f4f into ReactiveX:2.x Dec 29, 2016
@akarnokd akarnokd deleted the PublishFuncFix branch December 29, 2016 16:41
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