func (c *counter) cancel() {
	c.mu.Lock()
	defer c.mu.Unlock()
	c.n = math.MaxInt64
}
func (c *counter) cancel() {
	c.mu.Lock()
	defer c.mu.Unlock()
	c.n = math.MaxInt64
}
// cancel indicates that an error has occurred which will prevent any further
// calls to Write, it causes all calls to wait() to return