mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-29 21:00:54 +00:00
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. Co-authored-by: Austin Bonander <austin.bonander@gmail.com>