// Close stops the internal go routines used for e.g. sampling
767601
func (met *Metrics) Close() {
	for _, r := range met.rates {
		r.ticker.Stop()
	}
}
789463
func (p *Plugin) Close() error {
	//TODO close error report channel

	p.mu.Lock()
	defer p.mu.Unlock()

	p.registrations = make(map[string]*registration)

	return nil
}
1295945
func (rw *Response) Close() error {
	defer rw.closedLock.Unlock()

	if rw.body != nil {
		return rw.body.Close()
	}
	return nil
}
509917
func (r *Response) Close() error {

	if r.Error != nil {
		return r.Error
	}

	io.Copy(ioutil.Discard, r)

	return r.RawResponse.Body.Close()
}
856282
func (s *spiDriver) Close() error {
	for _, b := range s.busMap {
		b.Close()
	}

	return nil
}
39161
func (rwops *RWops) Close() error {
	if rwops != nil && C.RWclose(rwops.cptr()) != 0 {
		return GetError()
	}
	return nil
}
211300
func (s *Storage) Close() {
	s.run(func() error {
		s.closed = true
		return nil
	})
}
257806
func (m *mapReact) Close() {
	m.ro.RLock()
	for ms, ok := range m.ma {
		if !ok {
			continue
		}
		ms.Close()
	}
	m.ro.RUnlock()
	m.Clean()
}
572314
func (t *terminal) Close() error {
	var err error
	// note, pty is closed in the copying goroutine,
	// not here to avoid data races
	if t.tty != nil {
		if e := t.tty.Close(); e != nil {
			err = e
		}
	}
	go t.closePTY()
	return trace.Wrap(err)
}
839726
func (p *pool) close() error {
	_, err := p.do(closeRequest, nil)
	return err
}
648011
func (s *RemotelyControlledSampler) Close() {
	if swapped := atomic.CompareAndSwapInt64(&s.closed, 0, 1); !swapped {
		s.logger.Error("Repeated attempt to close the sampler is ignored")
		return
	}

	var wg sync.WaitGroup
	wg.Add(1)
	s.doneChan <- &wg
	wg.Wait()
}
1013736
func (c *GorymanClient) Close() error {
	if nil == c.udp && nil == c.tcp {
		return nil
	}
	err := c.udp.Close()
	if err != nil {
		return err
	}
	return c.tcp.Close()
}
1328257
func (p *ProgressWriter) Close() (err error) {
	err = p.w.Close()
	p.stopProgress()
	return
}
546770
func Close(c Closer) {
	if err := c.Close(); err != nil {
		log.Warnf("failed to close %v: %v", c, err)
	}
}
1107792
func Close(ctx context.Context, c io.Closer) {
	// need to verify that the value of the `c` interface if not nil, too
	if c != nil && !reflect.ValueOf(c).IsNil() {
		err := c.Close()
		if err != nil {
			log.Error(ctx, map[string]interface{}{"error": err.Error()}, "error while closing the resource")
		}
	}

}
932633
func (rows *OCI8Rows) Close() error {
	if rows.closed {
		return nil
	}

	rows.closed = true
	close(rows.done)

	if rows.cls {
		rows.stmt.Close()
	}

	freeDefines(rows.defines)

	return nil
}
170051
func (m *enumerator) Close() error {
	var rv error
	for _, itr := range m.itrs {
		err := itr.Close()
		if rv == nil {
			rv = err
		}
	}
	return rv
}