// Close the queue.
975653
func (f *DeltaFIFO) Close() {
	f.closedLock.Lock()
	defer f.closedLock.Unlock()
	f.closed = true
	f.cond.Broadcast()
}
425239
func (c *Conn) Close() error {
	fmt.Fprintf(c.Transcript, "Server closing connection\n")
	return c.Rwc.Close()
}
644337
func (q *Qbs) Close() error {
	if connectionLimit != nil {
		<-connectionLimit
	}
	if q.tx != nil {
		return q.Rollback()
	}
	return nil
}
978526
func (t *UdpTransport) Close() error {
	close(t.requestQueue)
	err := t.conn.Close()
	if err != nil {
		return err
	}
	return nil
}
1275569
func (p *Pool) Close() {
	close(p.closing)

	for p.created > 0 {
		c := <-p.clients
		c.Quit()
		p.dec()
	}
}
799621
func (s *BufferedSender) Close() error {
	// since we are running, write lock during cleanup
	s.runmx.Lock()
	defer s.runmx.Unlock()
	if !s.running {
		return nil
	}

	errChan := make(chan error)
	s.running = false
	s.shutdown <- errChan
	return <-errChan
}
251833
func (c *Client) Close() error {
	defer close(c.notify)

	_, err := c.Exec("quit")
	err2 := c.conn.Close()

	if err != nil {
		return err
	}

	return err2
}
455789
func (c *Client) Close() (err error) {
	if c.text != nil {
		c.printfLine("close")
		err = c.text.Close()
		c.text = nil
	}
	return
}
1144566
func (server *UnixServer) Close() {
	if server.listener != nil {
		listener := server.listener
		server.listener = nil
		listener.Close()
	}
}
251618
func (s *Server) Close() {
	if atomic.CompareAndSwapInt64(&s.closed, 0, 1) {
		s.lck.Lock()
		defer s.lck.Unlock()
		close(s.closeSig)
		s.srv.Close()
		s.srv.CloseClientConnections()
		return
	}
}
383995
func (queue *redisQueue) Close() bool {
	queue.PurgeRejected()
	queue.PurgeReady()
	count, _ := queue.redisClient.SRem(queuesKey, queue.name)
	return count > 0
}
363233
func (p *process) close() {
	p.closeOnce.Do(func() {
		p.relay.close()

		// Free any waiters
		close(p.waitBlock)
	})
}
1197953
func (p *Pool) Close() error {
	defer scopedLock(&p.mutx)()

	var err error
	for _, pool := range p.pools {
		if e := pool.Close(); e != nil {
			err = e
		}
	}
	return err
}
861451
func (r *RingLogger) Close() error {
	r.setClosed()
	r.buffer.Close()
	// empty out the queue
	var logErr bool
	for _, msg := range r.buffer.Drain() {
		if logErr {
			// some error logging a previous message, so re-insert to message pool
			// and assume log driver is hosed
			PutMessage(msg)
			continue
		}

		if err := r.l.Log(msg); err != nil {
			logrus.WithField("driver", r.l.Name()).
				WithField("container", r.logInfo.ContainerID).
				WithError(err).
				Errorf("Error writing log message")
			logErr = true
		}
	}
	return r.l.Close()
}
166155
func (iter *MockStateRangeQueryIterator) Close() error {
	if iter.Closed == true {
		err := errors.New("MockStateRangeQueryIterator.Close() called after Close()")
		mockLogger.Errorf("%+v", err)
		return err
	}

	iter.Closed = true
	return nil
}
471387
func (s *server) Close() error {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	if s.closed {
		return nil
	}
	return s.closeWithMutex()
}
1326864
func (t *BucketRateLimiter) Close() (err error) {
	t.cancel()
	return t.egCleaner.Wait()
}