mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
BSD locks.
This commit is contained in:
@@ -57,13 +57,13 @@ On Linux, macOS and illumos, this module uses
|
||||
to synchronize access to database files.
|
||||
OFD locks are fully compatible with process-associated POSIX advisory locks.
|
||||
|
||||
On BSD Unixes, this module may use
|
||||
On BSD Unixes, this module uses
|
||||
[BSD locks](https://man.freebsd.org/cgi/man.cgi?query=flock&sektion=2).
|
||||
BSD locks may _not_ be compatible with process-associated POSIX advisory locks.
|
||||
On BSD Unixes, BSD locks _should_ be compatible with process-associated POSIX advisory locks.
|
||||
|
||||
##### TL;DR
|
||||
|
||||
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.
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build sqlite3_flock || freebsd
|
||||
//go:build (freebsd || openbsd || netbsd || dragonfly || sqlite3_flock) && !sqlite3_nolock
|
||||
|
||||
package vfs
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build sqlite3_nolock && unix && !(linux || darwin || freebsd || illumos)
|
||||
//go:build sqlite3_nolock && unix && !darwin
|
||||
|
||||
package vfs
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build (linux || illumos) && !sqlite3_flock
|
||||
//go:build (linux || illumos) && !(sqlite3_flock || sqlite3_nolock)
|
||||
|
||||
package vfs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user