Skip to content

Commit

Permalink
Make busy-blocking more responsive
Browse files Browse the repository at this point in the history
Fixes #75
  • Loading branch information
zombiezen committed Feb 2, 2024
1 parent 5c555a3 commit e2b3038
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

[Unreleased]: https://github.com/zombiezen/go-sqlite/compare/v1.1.0...main

## [Unreleased][]

### Fixed

- Make busy-blocking more responsive
([#75](https://github.com/zombiezen/go-sqlite/issues/75)).

## [1.1.0][] - 2024-01-14

Version 1.1 introduces the ability to prepare connections on `sqlitex.Pool`,
Expand Down
16 changes: 16 additions & 0 deletions sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,22 @@ func (c *Conn) SetBlockOnBusy() {
}

var busyDelays = [...]time.Duration{
1 * time.Millisecond,
2 * time.Millisecond,
5 * time.Millisecond,
10 * time.Millisecond,
15 * time.Millisecond,
20 * time.Millisecond,
25 * time.Millisecond,
25 * time.Millisecond,
25 * time.Millisecond,
50 * time.Millisecond,
50 * time.Millisecond,
100 * time.Millisecond,
250 * time.Millisecond,
250 * time.Millisecond,
500 * time.Millisecond,

1 * time.Second,
2 * time.Second,
5 * time.Second,
Expand Down

0 comments on commit e2b3038

Please sign in to comment.