mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-14 10:18:02 +00:00
Clarify unix.mapshared versus file locks (#1355)
Some checks are pending
build / matrix_on_mode () (push) Waiting to run
build / matrix_on_mode (optlinux) (push) Waiting to run
build / matrix_on_mode (rel) (push) Waiting to run
build / matrix_on_mode (tiny) (push) Waiting to run
build / matrix_on_mode (tinylinux) (push) Waiting to run
Some checks are pending
build / matrix_on_mode () (push) Waiting to run
build / matrix_on_mode (optlinux) (push) Waiting to run
build / matrix_on_mode (rel) (push) Waiting to run
build / matrix_on_mode (tiny) (push) Waiting to run
build / matrix_on_mode (tinylinux) (push) Waiting to run
This commit is contained in:
parent
7f6a7d6fff
commit
12cb0669fb
1 changed files with 3 additions and 3 deletions
|
@ -4864,9 +4864,9 @@ UNIX MODULE
|
|||
end
|
||||
|
||||
It's possible to accomplish the same thing as unix.mapshared()
|
||||
using files and unix.fcntl() advisory locks. However this goes
|
||||
significantly faster. For example, that's what SQLite does and
|
||||
we recommend using SQLite for IPC in redbean. But, if your app
|
||||
using files and unix.fcntl() advisory locks. For example, that's
|
||||
what SQLite does and we recommend using SQLite for IPC in redbean.
|
||||
However, unix.mapshared is significantly faster and if your app
|
||||
has thousands of forked processes fighting for a file lock you
|
||||
might need something lower level than file locks, to implement
|
||||
things like throttling. Shared memory is a good way to do that
|
||||
|
|
Loading…
Reference in a new issue