// WaitCount returns how many clients are waiting for a connection
972834
func (cp *ConnectionPool) WaitCount() int64 {
	p := cp.pool()
	if p == nil {
		return 0
	}
	return p.WaitCount()
}
948495
func (s *Server) ClientCount() int {
	i := 0

	for _, channel := range s.channels {
		i += channel.ClientCount()
	}

	return i
}
1012790
func (c *Client) WaitContainer(id string) (int, error) {
	return c.waitContainer(id, doOptions{})
}
1046211
func WaitFunc(wait func(context.Context, *cdp.Frame, ...cdp.NodeID) ([]*cdp.Node, error)) QueryOption {
	return func(s *Selector) {
		s.wait = wait
	}
}
165923
func (p *Pool) ActiveCount() int {
	p.mu.Lock()
	active := p.active
	p.mu.Unlock()
	return active
}
502880
func WaitForServiceEndpointsNum(c kubernetes.Interface, namespace, serviceName string, expectNum int, interval, timeout time.Duration) error {
	return wait.Poll(interval, timeout, func() (bool, error) {
		glog.Infof("Waiting for amount of service:%s endpoints to be %d", serviceName, expectNum)
		list, err := c.Core().Endpoints(namespace).List(metav1.ListOptions{})
		if err != nil {
			return false, err
		}

		for _, e := range list.Items {
			if e.Name == serviceName && countEndpointsNum(&e) == expectNum {
				return true, nil
			}
		}
		return false, nil
	})
}
874413
func (c *Conn) Count() (int, error) {
	code, m, err := c.doRPC("/rpc/status", nil)
	if err != nil {
		return 0, err
	}
	if code != 200 {
		return 0, makeError(m)
	}
	return strconv.Atoi(string(findRec(m, "count").Value))
}
435527
func (t *TrafficData) GetCount() int {
	if t == nil || t.Count == nil {
		return 0
	}
	return *t.Count
}
572411
func (a *Account) NumConnections() int {
	a.mu.RLock()
	nc := len(a.clients) + int(a.nrclients)
	a.mu.RUnlock()
	return nc
}
1292446
func (t *TrafficReferrer) GetCount() int {
	if t == nil || t.Count == nil {
		return 0
	}
	return *t.Count
}
1132865
func (cp *ConnectionPool) WaitTime() time.Duration {
	p := cp.pool()
	if p == nil {
		return 0
	}
	return p.WaitTime()
}
168474
func (v *EchoResponse) GetCount() (o int16) {
	if v != nil {
		o = v.Count
	}
	return
}
146847
func waitServer(url string) bool {
	tries := 20
	for tries > 0 {
		resp, err := http.Get(url)
		if err == nil {
			resp.Body.Close()
			return true
		}
		time.Sleep(100 * time.Millisecond)
		tries--
	}
	return false
}
251933
func (c *EC2) WaitUntilVpcPeeringConnectionDeleted(input *DescribeVpcPeeringConnectionsInput) error {
	return c.WaitUntilVpcPeeringConnectionDeletedWithContext(aws.BackgroundContext(), input)
}
370581
func (status Status) Count() (int, error) {
	conn := redisPool.Get()
	defer conn.Close()
	return redis.Int(conn.Do("ZCARD", status.Key()))
}
546513
func (nd *Node) connectionLimitReached() (res bool) {
	if nd.cluster.clientPolicy.LimitConnectionsToQueueSize {
		cc := nd.connectionCount.IncrementAndGet()
		if cc > nd.cluster.clientPolicy.ConnectionQueueSize {
			res = true
		}

		nd.connectionCount.DecrementAndGet()
	}

	return res
}
1098350
func (c *EC2) WaitUntilVpnConnectionAvailable(input *DescribeVpnConnectionsInput) error {
	return c.WaitUntilVpnConnectionAvailableWithContext(aws.BackgroundContext(), input)
}