// Decrementor returns a function that can be called from multiple goroutines and ensures
// it will only return true n times.
Decrementor returns a function that can be called from multiple goroutines and ensures
it will only return true n times.
// Decrementor returns a function that can be called from multiple goroutines and ensures // it will only return true n times .
func Decrementor(n int) Decrement {
	return &decrementor{
		n: *atomic.NewInt64(int64(n)),
	}
}
func Decrementor ( n int ) Decrement { return & decrementor { n : * atomic . NewInt64 ( int64 ( n ) ) , } }
Decrementor returns a function that can be called from multiple goroutines and ensures
it will only return true n times.
Decrementor returns a function that can be called from multiple goroutines and ensures it will only return true n times .