// TakeAll blocks until it holds all available semaphore resources. When it
// returns, the caller owns all of the resources in the semaphore.
977295
func (s Semaphore) TakeAll() {
	for i := 0; i < cap(s); i++ {
		s.Lock()
	}
}
1323089
func (c *Client) FlushAll() error {
	_, err := c.execOnFirst(false, "FLUSHALL")
	return err
}
47593
func (c *Collection) DeleteAll() (int, error) {
	t := c.pool.NewTransaction()
	count := 0
	t.DeleteAll(c, &count)
	if err := t.Exec(); err != nil {
		return count, err
	}
	return count, nil
}
1098767
func (a *AllocGarbageCollector) CollectAll() {
	for {
		select {
		case <-a.shutdownCh:
			return
		default:
		}

		gcAlloc := a.allocRunners.Pop()
		if gcAlloc == nil {
			return
		}

		go a.destroyAllocRunner(gcAlloc.allocID, gcAlloc.allocRunner, "forced full node collection")
	}
}
625234
func (l *Loader) ClearAll() Interface {
	l.cacheLock.Lock()
	l.cache.Clear()
	l.cacheLock.Unlock()
	return l
}
637227
func (h *interfaces) PopAll() []interface{} {
	for n := h.Len(); n > 1; n-- {
		PopToLastF(n, h.less, func(i, j int) { h.list[i], h.list[j] = h.list[j], h.list[i] })
	}
	res := h.list
	h.list = nil
	return res
}
169464
func (store *MemoryStore) All() []string {
	store.RLock()
	defer store.RUnlock()
	if !store.opened {
		ERROR.Println(STR, "Trying to use memory store, but not open")
		return nil
	}
	keys := []string{}
	for k := range store.messages {
		keys = append(keys, k)
	}
	return keys
}
224546
func (g *Oper) ReadAll() ([]core.State, error) {
	return g.StateDriver.ReadAllState(operGlobalPrefix, g, json.Unmarshal)
}
565294
func (rs *Resources) StopAll() {
	rs.mu.Lock()
	defer rs.mu.Unlock()
	for i := len(rs.stack); i > 0; i-- {
		id := rs.stack[i-1]
		r := rs.resources[id]
		logger.Tracef("stopping resource: %s", id)
		if err := r.Stop(); err != nil {
			logger.Errorf("error stopping %T resource: %v", r, err)
		}
	}
	rs.resources = make(map[string]facade.Resource)
	rs.stack = nil
}
586500
func (rm ReachMap) FlattenAll(stdlib bool) []string {
	return rm.flatten(func(pkg string) bool { return true }, stdlib)
}
822738
func take(tokens int, ls ...*rate.Limiter) {
	// minBurst is the smallest burst size supported by all limiters.
	minBurst := int(math.MaxInt32)
	for _, l := range ls {
		if burst := l.Burst(); burst < minBurst {
			minBurst = burst
		}
	}

	for tokens > 0 {
		// chunk is how many tokens we can consume at a time
		chunk := tokens
		if chunk > minBurst {
			chunk = minBurst
		}

		// maxDelay is the longest delay mandated by any of the limiters for
		// the chosen chunk size.
		var maxDelay time.Duration
		for _, l := range ls {
			res := l.ReserveN(time.Now(), chunk)
			if del := res.Delay(); del > maxDelay {
				maxDelay = del
			}
		}

		time.Sleep(maxDelay)
		tokens -= chunk
	}
}
867183
func (c *Client) DeleteAll() error {
	return c.withKeyRw("", func(rw *bufio.ReadWriter) error {
		return writeExpectf(rw, resultDeleted, "flush_all\r\n")
	})
}
213889
func (s *Store) All() []*Future {
	s.RLock()
	defer s.RUnlock()

	all := make([]*Future, 0, len(s.store))

	for _, savedFuture := range s.store {
		all = append(all, savedFuture)
	}

	return all
}
600396
func All(startStoppers ...StartStopper) map[StartStopper]error {

	var wg sync.WaitGroup
	errs := make(map[StartStopper]error)
	var errsL sync.Mutex
	wg.Add(len(startStoppers))

	// start everything
	for _, s := range startStoppers {
		go func(s StartStopper) {
			if err := s.Start(); err != nil {
				errsL.Lock()
				errs[s] = err
				errsL.Unlock()
			}
			wg.Done()
		}(s)
	}

	// wait for all things to start
	wg.Wait()

	return errs
}
1360645
func (pl *List) releaseAll(errs error, peers []*peerThunk) error {
	for _, t := range peers {
		if err := pl.transport.ReleasePeer(t.peer, t); err != nil {
			errs = multierr.Append(errs, err)
		}
	}
	return errs
}
266395
func (m *MultiMap) PutAll(key interface{}, values []interface{}) {
	for _, value := range values {
		m.Put(key, value)
	}
}
840874
func (r *AutoVLANOperResource) ReadAll() ([]core.State, error) {
	return r.StateDriver.ReadAllState(vLANResourceOperPathPrefix, r,
		json.Unmarshal)
}