Merged
Conversation
The 'simple' example seemed to have every possible feature crammed in! Aside from my conviction that the word 'simple' should really never be used in documentation (if something is simple then why are you documenting it?), my main difficulty here was trying to figure out where `async` and `await` are needed on the various statements. i.e. if I'm just queueing up commands for execution, why do I need to await them? And why do I need to await the call to `client.pipeline()`? This is all quite verbose and certainly not simple. Also I emphatically assummed that the `with` context manager would actually execute the pipeline upon exit, otherwise what is a context manager for?? (yes I've read the source and see that you can reuse a pipeline; I would have just created a new pipeline for a new transaction) Anyhow hopefully this smaller example is correct and will be helpful to future readers of the documentation.
Contributor
Author
|
Has anyone previously also assumed that a |
Contributor
|
@eoghanmurray This can be implemented without breaking changes, calling Lines 268 to 269 in cec3cda I doubt there is a use case where someone intentionally left commands after |
eoghanmurray
added a commit
to eoghanmurray/aredis
that referenced
this pull request
Aug 19, 2020
…lock (the behaviour I expected) - see comment from @Fogapod NoneGG#155 (comment)
Contributor
Author
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The 'simple' example seemed to have every possible feature crammed in!
Aside from my conviction that the word 'simple' should really never be used in documentation (if something is simple then why are you documenting it?), my main difficulty here was trying to figure out where
asyncandawaitare needed on the various statements.i.e. if I'm just queueing up commands for execution, why do I need to await them? And why do I need to await the call to
client.pipeline()? This is all quite verbose and certainly not simple.Also I emphatically assummed that the
withcontext manager would actually execute the pipeline upon exit, otherwise what is a context manager for?? (yes I've read the source and see that you can reuse a pipeline; I wouldn't have thought to do it this way but would have just created a new pipeline for a new transaction)Anyhow hopefully this smaller example is correct and will be helpful to future readers of the documentation.