コード例 #1
0
ファイル: atomic.go プロジェクト: vozhyk-/gohan
//CounterValue makes thread safe counter
func CounterValue(counter *util.Counter) int {
	return int(counter.Value())
}
コード例 #2
0
ファイル: atomic.go プロジェクト: vozhyk-/gohan
//CounterAdd makes thread safe counter
func CounterAdd(counter *util.Counter, value int) {
	counter.Add(int64(value))
}