#locks #processes

namaste

Simple locks between processes

19 releases (breaking)

✓ Uses Rust 2018 edition

0.15.2 Aug 12, 2019
0.14.0 Jul 9, 2019
0.5.1 Mar 31, 2019

#119 in Concurrency

Download history 5/week @ 2019-04-29 7/week @ 2019-05-06 10/week @ 2019-05-13 25/week @ 2019-05-20 7/week @ 2019-05-27 47/week @ 2019-06-03 26/week @ 2019-06-10 50/week @ 2019-06-17 176/week @ 2019-06-24 97/week @ 2019-07-01 92/week @ 2019-07-08 6/week @ 2019-07-15 37/week @ 2019-07-22 1/week @ 2019-07-29 112/week @ 2019-08-05

229 downloads per month
Used in 1 crate

Custom license

19KB
270 lines

Namaste




lib.rs:

Namaste

Project

Features

Handling locks amongst processes.

Design

Identifier

An identifier - ID - is a 64-byte array, which matches an SHA3-512 hash.

Namaste can be used to lock an ID.

  • On Linux, it uses abstract sockets (see unix(7)).
  • On other Unix systems, it uses file locks.

Frequently Answered Questions

Why not Unix Domain Socket?

UDS has a good design, but its implementation has some serious flaws:

  • Already-bound file path can be deleted. Any new binding to that path will silently take control of current one.

Why file locks?

Files can still be deleted even when locked. But, that's the only way that other systems support.

Other notes

To generate an ID, you can get help from Dia-Hammer:

$ hammer sha3-512 --limit=65536 --format=hex-array -- /dev/urandom

To generate a handshake ID, you can use tiny-keccak.

Dependencies

~210KB