Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Reuse context.Context for the entire batch#6

Merged
elgopher merged 1 commit intomasterfrom
reuse-context
May 7, 2022
Merged

Reuse context.Context for the entire batch#6
elgopher merged 1 commit intomasterfrom
reuse-context

Conversation

@elgopher
Copy link
Owner

@elgopher elgopher commented May 7, 2022

This is needed to support database transactions. After LoadResource succeeded the context cannot be canceled, because in the database driver there might be a running go-routine dedicated for transaction which will automatically roll back the transaction once context is canceled.

This is needed to support database transactions. After LoadResource succeeded the context cannot be canceled, because in the database driver there might be a running go-routine dedicated for transaction which will automatically roll back the transaction once context is canceled.
@elgopher elgopher merged commit 166b653 into master May 7, 2022
@elgopher elgopher deleted the reuse-context branch May 7, 2022 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant