Skip to content

Latest commit

 

History

History
16 lines (15 loc) · 320 Bytes

README.md

File metadata and controls

16 lines (15 loc) · 320 Bytes

lox

For building and utilizing lock banks

Usage

bank := lox.NewBank()
bank.Lock("resourceA")
// nothing else can use resourceA
...
bank.Lock("resourceB")
// nothing else can use resourceA or resourceB
...
bank.Unlock("resourceB")
bank.Unlock("resourceA")

See the examples dir for more detailed examples.