-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
c597a22
commit 78754ac
Showing
1 changed file
with
16 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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