-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cancel too synchronized in MonoCollect[List] (#3053)
This commit reduces the length of the critical section in MonoCollectList and MonoCollect cancel() method that is synchronized. In particular, it removes upstream.cancel() from said critical section. This will prevent a deadlock in case the upstream operator protects a resource using synchronization in both its cancel() method and in any other method that calls the collect subscriber downstream (typically onNext()). By making the critical section shorter, we ensure that the relevant fields are read / written to / nulled out correctly while avoiding synchronization on the calls to the upstream / downstream, hence restoring progress. Fixes #3052.
- Loading branch information
1 parent
b07f391
commit 42d21d8
Showing
4 changed files
with
120 additions
and
17 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
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