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

feat(postgres): remove lifetime from PgAdvisoryLockGuard #3495

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Sep 9, 2024

  1. feat(postgres): remove lifetime from PgAdvisoryLockGuard

    Unlike with CPU synchronization primitives, there is no semantic requirement
    that the guard borrows the lock object.
    
    We preserve the optimization of memoizing the release query by wrapping it in
    an Arc. This way all instances of `PgAdvisoryLockGuard` that originate from the
    same lock will share a single instance of the release query.
    bonsairobo committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    78754ac View commit details
    Browse the repository at this point in the history