-
Notifications
You must be signed in to change notification settings - Fork 0
support immediate query cancellation #2
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
base: master
Are you sure you want to change the base?
Conversation
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.
Two general comments:
- Consider extracting the common steps in
ExecContext
andQueryContext
into a helper function to avoid accidentally fixing something in only one and not the other - Consider adding a comment before the query execution loop that a) explains it's for checking context cancellation, b) linking to relevant docs or implementation in other driver
@begelundmuller thanks for the comments. I was thinking of removing |
I also thought about that. It's very likely fine to remove them, though they're also easy to keep (can just call the context equivalent using context.Background()). Maybe remove them to keep things clean? Just to clarify, my comment above about duplication referred to the duplicated logic in ExecContext and QueryContext. |
Its not straightforward to call as Will clean up duplicated logic. |
I can have something like this to convert between the two
|
No description provided.