-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publisher#flatMapSingle make subscription non-volatile (#1025)
Motivation: Publisher#flatMapSingle has the Subscription from onSubscribe saved to a volatile variable. This was due to the Subscription being in the context of the mapped Single's Subscriber termination callbacks and ambiguity in the Reactive Streams specification about visibility related to Publisher#subscribe(..) and Subscriber state. However recent [discussions](reactive-streams/reactive-streams-jvm#486) have provided more insight that the Publisher must provide visibility, and therefore the volatile state is not necessary. Modifications: - Publisher#flatMapSingle subscription member variable can be non-volatile Result: Less volatile state and more clear expecations.
- Loading branch information
1 parent
29c4f7d
commit c4fa823
Showing
1 changed file
with
8 additions
and
12 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