Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
NIOAsyncSequenceProducer
watermark strategy.
# Motivation It was currently possible that the producer's delegate is getting called twice with `produceMore` even if no `yield` returned a `stopProducing`. This could happen when we expected the producer to yield elements but the consumer went below the low watermark again. Resulting in two subsequent calls. # Modification This PR stores the current demand state in the strategy which let's us avoid flipping the `hasOustandingDemand` state of the sequence. # Result Correctly, ensured the call order of `produceMore` and `stopProducing`.
- Loading branch information