-
Notifications
You must be signed in to change notification settings - Fork 534
1.3 imprecise #431
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
Comments
Hi @davidmoten, apologies for the late response. Good point. Perhaps we should say "sequentially", and if performed by multiple threads, each signal must happen-before the other? @reactive-streams/contributors Wdyt? |
@davidmoten Perhaps we should reuse the "external synchronization" verbiage? |
As @davidmoten suggested originally, "serially" (see Serializability, wiki) is a quite common term in multithreading/concurrency literature (also present in RxJava sources) that means "without overlapping in time", might be a bit better choice than "sequentially" :) |
The notion of serial does seem to be more prevalent in the literature. As defined in our glossary external synchronization is still vague just referring to "access coordination" so doesn't really nail things down. We could add serial or serially to the glossary and cover off there the notions of ordering and non-overlap (which we might explicitly mention as well perhaps because the signal going to a Subscriber is not some queued async signal but processed synchronously). |
How about:
|
@viktorklang when you use the happens-before term, does it also apply to the state managed by these methods ? |
Ping @davidmoten |
Yeah that helps. I think we can do better with the term external synchronization though. All contributors here understand this but a wider audience might be confused by it. When I google "external synchronization" all I see is clock synchronization for distributed systems. |
@davidmoten Any suggestions there? |
The best I can come up with is to use happens-before terminology. happens-before applies to actions not signals (messages) so mixing happens-before with the verb/noun signal is a tad confusing. I notice that the glossary defines signal like so:
AFAICS the normal interpretation of a noun signal in a computer science context is as a message and we have now redefined it to be the action incurred by that message. A tad confusing but we can run with it. With regards to:
We don't need to add "and if performed by multiple threads ..." because it is redundant (the wording implies it is an extra criterion) but rather some clarification about the use of multiple threads is nice to have in the comment under the rule. So I'm thinking:
and a comment of:
|
@davidmoten "signal" is conceptually messages in this model, but since synchronous Publishers and Subscribers are permitted, it has to refer to the methods (as a noun).
Sounds like a great explanation. I would want to avoid using "demand" in this context as to avoid confusion with the other notion of "demand" in this spec. Perhaps something like this?
|
@viktorklang sounds good. Might be able to improve on my double negative:
Could be simplified a bit more? Perhaps
|
@davidmoten Perhaps even simpler:
|
I'm good with that. Could replace the is established with there is:
|
@davidmoten I felt that wording to be a bit vague on what was required by the implementor. Is there some wording which clearly states that the implementor much provide this? |
I understand. If you want to emphasize that then let's leave it as you had it. |
@davidmoten Cool. Do you want to do the honors of opening a PR? |
Okey doke |
I realize there is a tad more to talk about. We propose for 1.3:
and a comment of:
However, I see there is a convention in place where every comment starts with "The intent of this rule is". If we do follow the convention then perhaps something like: The intent of this rule is to permit the signalling of signals from multiple threads if a happens-before relation between each of the signals is established. |
@davidmoten Great catch with the Intent-section! I believe we also need to supersede the use of "External synchronization" in the spec (amend 2:7). Come to think of it, I think we need an iff in the intent: The intent of this rule is to permit the signalling of signals from multiple threads iff a happens-before relation between each of the signals is established. |
Yeah I agree, you want it expanded (if and only if)? To retire the "External synchronization" term we'll need to
I'll put up some suggestions and we can bounce them around. |
@davidmoten I think we need to spell it out so people who are unfamiliar with it don't think it's a typo. Your plan sounds good, I'm looking forward to having a look at your suggestions. |
@davidmoten What's the status here, David? |
@viktorklang I'll have another look this week |
@viktorklang |
@davidmoten No worries, I understand. As for 2.7, see the discussion here: #405 (comment) |
@davidmoten Ping. |
1 similar comment
@davidmoten Ping. |
* improve Publisher 1.3 #431 * add Serially glossary entry * update README with specification wording changes * update 2.7 intent * update because happens-before applicable in single thread for preventing re-entrancy
I was asked for documentation about signals being published serially by a Publisher and looked at 1.3. Seems rather imprecise. It says:
The vague bit to me is signalled in a thread-safe manner. I think we can be more precise, something like:
The comment box for 1.3 could then mention that
The text was updated successfully, but these errors were encountered: