-
-
Notifications
You must be signed in to change notification settings - Fork 731
Concept/Rules: Document parallelism of rule execution #2573
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
aace84a
concept/rules: state that a rule cannot be executed in parallel
dilyanpalauzov 44bfc10
Apply suggestions from code review
florian-h05 8b7fed6
Apply suggestions from code review
florian-h05 c6bdb22
Review changes
florian-h05 e546dd8
Review changes
florian-h05 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -801,7 +801,8 @@ Caveat: Please note the semicolon after the return statement which terminates th | |||||
|
|
||||||
| ### Concurrency Guard | ||||||
|
|
||||||
| If a rule triggers on UI events it may be necessary to guard against concurrency. | ||||||
| If a rule is explicitly run from another script, rule, MainUI widget, instead of a trigger, the rule can be started before the current execution has ended. | ||||||
florian-h05 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| If a rule is explicitly run from another script, rule, MainUI widget, instead of a trigger, the rule can be started before the current execution has ended. | |
| If a rule is explicitly run from another script, rule, a Main UI widget, instead of a trigger, the rule can be started before the current execution has ended. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
There should be no
orhere. It is possible to execute a rule by calling RunNow. So the list is not exclusive and therefore there should be no finalor.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.
That's not correct, that's not a rule in English and the first form is just invalid/incomplete. Perhaps this rule exists in another language?
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.
Omitting conjunctions in a list it discussed at https://english.stackexchange.com/questions/15970/omitting-and-in-a-sentence .
https://www.litcharts.com/literary-devices-and-terms/asyndeton says “Lists that do not include conjunctions leave open the possibility that there could be more elements within a series.”
Uh oh!
There was an error while loading. Please reload this page.
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.
They are discussing "creative writing", not formal documentation, and the way it's used in the example there is much more "acceptable" than simply ending a sentence in what feels like without completing it.
What I would typically do in such a situation, where I don't want to give the impression that the list is exclusive, is:
"for example from a script, another rule or a Main UI widget."
Uh oh!
There was an error while loading. Please reload this page.
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.
It's not a rule of grammar for English in general, but there can be rules set down in style guides and context.
Usually, in technical or academic writing, asyndetons are to be avoided or used sparingly and in a way that does not disrupt the formal tone of the writing.
OH docs do not really follow any specific writing style guide (e.g. MLA, Chicago, AP, IEEE, etc.) but it would qualify as technical and therefore more formal writing. Probably the guide that would be most applicable to the OH docs would be IEEE which, while not mentioning asyndeton by name, has rules which effectively discourage its use in favor of syndetic writing. I can find the exact reference if desired, but this AI summary matches with what I know.
In formal writing, if you wanted to omit the "or" and indicate that the list is not complete use "etc.".
While this seems to violate the rule, the "or" is implit in the word "etcetera" so can be omitted.