Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timbunce/semaphoric
lightweight counting semaphore concurrency control shell utility using flock
https://github.com/timbunce/semaphoric
Last synced: about 16 hours ago
JSON representation
lightweight counting semaphore concurrency control shell utility using flock
- Host: GitHub
- URL: https://github.com/timbunce/semaphoric
- Owner: timbunce
- License: apache-2.0
- Created: 2015-02-22T13:19:57.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-18T12:55:15.000Z (almost 10 years ago)
- Last Synced: 2023-04-21T14:10:55.690Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 137 KB
- Stars: 6
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
semaphoric - lightweight counting semaphore concurrency control using flock
===========================================================================A utility to limit concurrency by running a command only if fewer than some
number of other commands (associated with an arbitrary id) are running.The id defines the scope of the semaphore.
If id contains a / then it's treated as the directory to store the semaphores.
Otherwise they're stored in /tmp/semaphoric-$USER/.Features:
- very lightweight (unlike gnu parallels sem utility)
- most callers block cheaply on file lock until ready
- only one process (the next-to-be-run) polls for a semaphore
- first-in-first-out queuing, no starvation or similar risks
- uses filehandle locks (not SysV semaphores) so is robust and stable
- returns the exit status of the command that was run