Skip to content
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

Add context manager for unpinning #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jun 28, 2022

  1. Add support for nested context manager use

    This commit adds support for nested use of the UsePrimaryDB context manager. If a new instance of the context manager was created at each level we could use instance variables to store the pinning state but the default instance is generally used directly. Instead, we store a stack of pinning values locally in the thread and pop each value as we unwind the stack.
    bardiharborow committed Jun 28, 2022
    Configuration menu
    Copy the full SHA
    1ce1974 View commit details
    Browse the repository at this point in the history
  2. Add context manager for unpinning

    This commit adds a UseSecondaryDB context manager which unpins within a block.
    bardiharborow committed Jun 28, 2022
    Configuration menu
    Copy the full SHA
    b40d9aa View commit details
    Browse the repository at this point in the history