-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
11
A DESCRIPTION OF THE PROBLEM :
java.util.concurrent.SubmissionPublisher has an example class TransformProcessor. TransformProcessor.onNext() will immediately request one more item. Requesting one more before processing it may result in signal reordering.
See [this discussion][1] which resulted in the following explanation [added to the spec][2]:
"To avoid signal reordering caused by reentrant Subscription methods, it is strongly RECOMMENDED for synchronous Subscriber implementations to invoke Subscription methods at the very end of any signal processing."
I.e., the call to request one more item should move to the bottom of the method implementation.
[1]: https://github.com/reactive-streams/reactive-streams-jvm/issues/429
[2]: https://github.com/reactive-streams/reactive-streams-jvm#2.1
java.util.concurrent.SubmissionPublisher has an example class TransformProcessor. TransformProcessor.onNext() will immediately request one more item. Requesting one more before processing it may result in signal reordering.
See [this discussion][1] which resulted in the following explanation [added to the spec][2]:
"To avoid signal reordering caused by reentrant Subscription methods, it is strongly RECOMMENDED for synchronous Subscriber implementations to invoke Subscription methods at the very end of any signal processing."
I.e., the call to request one more item should move to the bottom of the method implementation.
[1]: https://github.com/reactive-streams/reactive-streams-jvm/issues/429
[2]: https://github.com/reactive-streams/reactive-streams-jvm#2.1