Skip to content

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

Merged
akarnokd merged 1 commit intoReactiveX:2.xfrom
akarnokd:PublishFuncFix
Dec 29, 2016
Merged

2.x: fix publish(Function) not replenishing its queue#4943
akarnokd merged 1 commit intoReactiveX:2.xfrom
akarnokd:PublishFuncFix

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