docs.rs failed to build ipc-lock-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
ipc-lock-0.1.4
ipc-lock
Cross-process named locks for Rust.
Works across both threads and processes on the same machine. The
cross-platform code uses no unsafe; platform-specific Win32 calls are
contained in a small, scoped module.
MSRV: Rust 1.89+
Platform support
| Platform | Mechanism |
|---|---|
| Unix (Linux, macOS, …) | flock(2) via std::fs::File::lock() |
| Windows | CreateMutexW (kernel named mutex, Global\ namespace) |
Usage
[]
= "0.1"
use ;
Lock is cheaply cloneable — all clones share the same underlying state:
let lock = new?;
let other = lock.clone; // O(1) Arc clone, same lock
let _guard = lock.lock?;
assert!; // WouldBlock
Name rules
- Must not be empty.
- Must not contain
\0,/, or\.
On Unix the lock file is placed at $TMPDIR/<name>.lock (falling back to
/tmp/<name>.lock). Use [Lock::with_path] to specify an exact path.
License
MIT — see LICENSE.