Skip to content

spencertipping/lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Optimistic locking for shell commands

Lock is a tool to make sure you run something only once at a time. For example:

$ lock foo sleep 60 &
[1] pidX
$ lock foo echo hi
Waiting for process pidX to release lock foo...
Waiting for process pidX to release lock foo...
Waiting for process pidX to release lock foo...
(60 times)
hi
[1]+  Done
$

Because both commands were run with the lock "foo", the second waited for the
first to return before running.

About

A mutex for shell commands

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages