mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 01:22:26 -05: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:
parent
486852fb38
commit
4fa0d41202
23 changed files with 194 additions and 104 deletions
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue