# README
Semaphore
s := semaphore.NewSemaphore(10)
go func() {
ctx := context.Background() // for cancellation
if s.Obtain(ctx) {
defer s.Release()
// do whatever
}
}()
For weighted semaphore, see this implementation.