[chore] Update WASM go-sqlite3 to v0.16.1 (#2976)

This includes support for journal mode set to WAL on the BSDs.

Relates to: #1753, #2962
This commit is contained in:
Daenney
2024-06-07 15:06:43 +02:00
committed by GitHub
parent afcfa48a7d
commit cc4f773b0e
46 changed files with 618 additions and 359 deletions

View File

@ -136,7 +136,7 @@ func osLock(file *os.File, flags, start, len uint32, timeout time.Duration, def
if timeout < time.Since(before) {
break
}
osSleep(time.Duration(rand.Int63n(int64(time.Millisecond))))
time.Sleep(time.Duration(rand.Int63n(int64(time.Millisecond))))
}
}
return osLockErrorCode(err, def)
@ -171,16 +171,3 @@ func osLockErrorCode(err error, def _ErrorCode) _ErrorCode {
}
return def
}
func osSleep(d time.Duration) {
if d > 0 {
period := max(1, d/(5*time.Millisecond))
if period < 16 {
windows.TimeBeginPeriod(uint32(period))
}
time.Sleep(d)
if period < 16 {
windows.TimeEndPeriod(uint32(period))
}
}
}