summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/vfs/lock.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-09-30 12:46:23 +0200
committerLibravatar GitHub <noreply@github.com>2024-09-30 12:46:23 +0200
commit188d28f054dbc9d8897a99d2213d8895922fc330 (patch)
tree2691665ad2e129ed7a07ea468024cc7db5005a54 /vendor/github.com/ncruces/go-sqlite3/vfs/lock.go
parent[bugfix] Carry-over "PinnedAt" when refreshing status (#3373) (diff)
downloadgotosocial-188d28f054dbc9d8897a99d2213d8895922fc330.tar.xz
[chore]: Bump github.com/ncruces/go-sqlite3 from 0.18.3 to 0.18.4 (#3375)
Bumps [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3) from 0.18.3 to 0.18.4. - [Release notes](https://github.com/ncruces/go-sqlite3/releases) - [Commits](https://github.com/ncruces/go-sqlite3/compare/v0.18.3...v0.18.4) --- updated-dependencies: - dependency-name: github.com/ncruces/go-sqlite3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/vfs/lock.go')
-rw-r--r--vendor/github.com/ncruces/go-sqlite3/vfs/lock.go14
1 files changed, 1 insertions, 13 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/vfs/lock.go b/vendor/github.com/ncruces/go-sqlite3/vfs/lock.go
index 5366fdb71..890684169 100644
--- a/vendor/github.com/ncruces/go-sqlite3/vfs/lock.go
+++ b/vendor/github.com/ncruces/go-sqlite3/vfs/lock.go
@@ -75,19 +75,7 @@ func (f *vfsFile) Lock(lock LockLevel) error {
if f.lock <= LOCK_NONE || f.lock >= LOCK_EXCLUSIVE {
panic(util.AssertErr())
}
- reserved := f.lock == LOCK_RESERVED
- // A PENDING lock is needed before acquiring an EXCLUSIVE lock.
- if f.lock < LOCK_PENDING {
- // If we're already RESERVED, we can block indefinitely,
- // since only incoming readers may briefly hold the PENDING lock.
- if rc := osGetPendingLock(f.File, reserved /* block */); rc != _OK {
- return rc
- }
- f.lock = LOCK_PENDING
- }
- // We are now PENDING, so we're just waiting for readers to leave.
- // If we were RESERVED, we can block for a bit before invoking the busy handler.
- if rc := osGetExclusiveLock(f.File, reserved /* block */); rc != _OK {
+ if rc := osGetExclusiveLock(f.File, &f.lock); rc != _OK {
return rc
}
f.lock = LOCK_EXCLUSIVE