Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 573 Bytes

README.md

File metadata and controls

35 lines (22 loc) · 573 Bytes

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