-
Notifications
You must be signed in to change notification settings - Fork 534
document rationale for void return of subscribe() #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -90,7 +92,9 @@ In addition there is one method each on Producer and Consumer to obtain a refere | |||
|
|||
The Reactive Streams SPI prescribes that all processing of elements (onNext) or termination signals (onError, onComplete) happens outside of the execution stack of the Publisher. This is achieved by scheduling the processing to run asynchronously, possibly on a different thread. The Subscriber should make sure to minimize the amount of processing steps used to initiate this process, meaning that all its SPI-mandated methods shall return as quickly as possible. | |||
|
|||
In contrast to communicating back-pressure by blocking the publisher, a non-blocking solution needs to communicate demand through a dedicated control channel. This channel is provided by the Subscription: the subscriber controls the maximum amount of future elements it is willing receive by sending explicit demand tokens (by calling requestMore(int)). | |||
In contrast to communicating back-pressure by blocking the publisher, a non-blocking solution needs to communicate demand through a dedicated control channel. This channel is provided by the Subscription: the subscriber controls the maximum amount of future elements it is willing receive by sending explicit demand tokens (by calling requestMore(int)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is signaled as changed because my editor removed the before its end; we should settle on Unix line encoding and fix the text files at some point
Is this change good to go? |
It's conflicting with the README merge that just went in. |
Moved the sentences to their new locations and pushed a rebase: there were no LGTMs that could have been invalidated. |
LGTM |
1 similar comment
LGTM |
@reactive-streams/contributors can this go in? |
👍 |
1 similar comment
+1 |
LGTM |
@@ -157,6 +156,7 @@ All of these variants are "asynchronous streams". They all have their place and | |||
|
|||
The Reactive Streams contract allows implementations the flexibility to manage resources and scheduling and mix asynchronous and synchronous processing within the bounds of a non-blocking, asynchronous, push-based stream. | |||
|
|||
In order to allow fully asynchronous implementations of all participating SPI elements—`Publisher`/`Subscription`/`Subscriber`—all methods defined by these interfaces return `void`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README currently only uses the term API
but this uses SPI
. Is that on purpose? Does it confuse things?
I'm good with these changes. Only possible thing to change is SPI/API term. |
I'll finalize on 0.4.0.M1 PR #61 @benjchristensen |
document rationale for void return of subscribe()
Thanks, @smaldini ! |
fixes #43