mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] Update go-sqlite3 to 0.18.3 (#3295)
* [chore] Update go-sqlite3 to 0.18.3 * [chore] Fix getting the sqlite3.Conn
This commit is contained in:
9
vendor/github.com/ncruces/go-sqlite3/vfs/lock.go
generated
vendored
9
vendor/github.com/ncruces/go-sqlite3/vfs/lock.go
generated
vendored
@ -79,16 +79,15 @@ func (f *vfsFile) Lock(lock LockLevel) error {
|
||||
// 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 new readers may briefly hold the PENDING lock.
|
||||
// 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 already have PENDING, so we're just waiting for readers to leave.
|
||||
// If we were RESERVED, we can wait for a little while, before invoking
|
||||
// the busy handler; we will only do this once.
|
||||
if rc := osGetExclusiveLock(f.File, reserved /* wait */); rc != _OK {
|
||||
// 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 {
|
||||
return rc
|
||||
}
|
||||
f.lock = LOCK_EXCLUSIVE
|
||||
|
Reference in New Issue
Block a user