-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publisher#flatMapMerge allow terminal propagation after invalid demand (
#2348) * Publisher#flatMapMerge allow terminal propagation after invalid demand Motivation: Publisher#flatMapMerge has internal state that tracks demand. This state is used to drive the internal state machine and prevents invalid demand to avoid internal state being corrupted. However this code didn't always allow for the subsequent terminal (e.g. likely onError) to be propagated downstream which may result in a hang. Modifications: - FlatMapPublisherSubscriber demand tracking shouldn't prevent terminal if there is too many items delivered. - Remove conditionals that are unnecessary for needsDemand because the call sites know if demand is required.
- Loading branch information
1 parent
ba7e826
commit 2928a29
Showing
7 changed files
with
356 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
171 changes: 105 additions & 66 deletions
171
...alk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/PublisherFlatMapMerge.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.