// Set sets the value of the counter.
Set sets the value of the counter.
// Set sets the value of the counter .
func (c *PCPCounter) Set(val int64) error {
	c.mutex.Lock()
	defer c.mutex.Unlock()
	v := c.val.(int64)
	if val < v {
		return errors.Errorf("cannot set counter to %v, current value is %v and PCP counters cannot go backwards", val, v)
	}
	return c.set(val)
}
func ( c * PCPCounter ) Set ( val int64 ) error { c . mutex . Lock ( ) defer c . mutex . Unlock ( ) v := c . val . ( int64 ) if val < v { return errors . Errorf ( " " , val , v ) } return c . set ( val ) }
Set sets the value of the counter.
Set sets the value of the counter .