Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

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

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages