mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-16 05:46:25 +00:00
Clarify unix.mapshared versus file locks
This commit is contained in:
parent
9f6bf6ea71
commit
5223907686
1 changed files with 3 additions and 3 deletions
|
@ -4864,9 +4864,9 @@ UNIX MODULE
|
||||||
end
|
end
|
||||||
|
|
||||||
It's possible to accomplish the same thing as unix.mapshared()
|
It's possible to accomplish the same thing as unix.mapshared()
|
||||||
using files and unix.fcntl() advisory locks. However this goes
|
using files and unix.fcntl() advisory locks. For example, that's
|
||||||
significantly faster. For example, that's what SQLite does and
|
what SQLite does and we recommend using SQLite for IPC in redbean.
|
||||||
we recommend using SQLite for IPC in redbean. But, if your app
|
However, unix.mapshared is significantly faster and if your app
|
||||||
has thousands of forked processes fighting for a file lock you
|
has thousands of forked processes fighting for a file lock you
|
||||||
might need something lower level than file locks, to implement
|
might need something lower level than file locks, to implement
|
||||||
things like throttling. Shared memory is a good way to do that
|
things like throttling. Shared memory is a good way to do that
|
||||||
|
|
Loading…
Add table
Reference in a new issue