Ejemplo n.º 1
0
//CounterValue makes thread safe counter
func CounterValue(counter *util.Counter) int {
	return int(counter.Value())
}
Ejemplo n.º 2
0
//CounterAdd makes thread safe counter
func CounterAdd(counter *util.Counter, value int) {
	counter.Add(int64(value))
}