Skip to content

g3offrey/semaphore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

semaphore

semaphore is a Go package, implementing a simple counting semaphore

Installation

go get github.com/g3offrey/semaphore

Usage

import "github.com/g3offrey/semaphore"

func TestSemaphore() {
    sem := semaphore.Make(capacity)

    sem.Acquire()
    // statements ...
    sem.Release()
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT