BSD locks.

This commit is contained in:
Nuno Cruces
2023-10-16 02:11:20 +01:00
parent 3f443b2ecc
commit db3e6da31a
5 changed files with 10 additions and 11 deletions

View File

@@ -8,18 +8,17 @@ It also exposes interfaces that should allow you to implement your own custom VF
## Portability
This package is tested on Linux, macOS and Windows,
but it should also work on FreeBSD and illumos
This package is continuously tested on Linux, macOS and Windows,
but it should also work on BSD Unixes and illumos
(code paths for those plaforms are tested on macOS and Linux, respectively).
In all platforms for which this package builds,
In all platforms for which this package builds out of the box,
it should be safe to use it to access databases concurrently,
from multiple goroutines, processes, and
with _other_ implementations of SQLite.
If the package does not build for your platform,
you may try to use the `sqlite3_flock` and `sqlite3_nolock` build tags.
These are only minimally tested and concurrency test failures should be expected.
you may try to use the `sqlite3_flock` or `sqlite3_nolock` build tags.
The `sqlite3_flock` tag uses
[BSD locks](https://man.freebsd.org/cgi/man.cgi?query=flock&sektion=2).

View File

@@ -1,4 +1,4 @@
//go:build sqlite3_flock || freebsd
//go:build (freebsd || openbsd || netbsd || dragonfly || sqlite3_flock) && !sqlite3_nolock
package vfs

View File

@@ -1,4 +1,4 @@
//go:build sqlite3_nolock && unix && !(linux || darwin || freebsd || illumos)
//go:build sqlite3_nolock && unix && !darwin
package vfs

View File

@@ -1,4 +1,4 @@
//go:build (linux || illumos) && !sqlite3_flock
//go:build (linux || illumos) && !(sqlite3_flock || sqlite3_nolock)
package vfs