semaphore is a Go package, implementing a simple counting semaphore
go get github.com/g3offrey/semaphore
import "github.com/g3offrey/semaphore"
func TestSemaphore() {
sem := semaphore.Make(capacity)
sem.Acquire()
// statements ...
sem.Release()
}
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.