// objects to their respective queue based on weight. When performing a pick operation, a queue is
// selected and an object is pulled. Each queue gets its own selection probability which is weighted
// Adding an object will cause the scheduler to rebuild internal structures on the first pick that
// follows. This first pick operation will be linear on the number of unique weights among objects
// inserted. Subsequent picks will be logarithmic with the number of unique weights. Adding objects
// NOTE: While the base scheduler interface allows for mutation of object weights with each pick,
// this implementation is not meant for circumstances where the object weights change with each pick
// (like in the least request LB). This scheduler implementation will perform quite poorly if the
// TODO(tonya11en): We can reduce memory utilization by using an absl::flat_hash_map of QueueInfo
// with heterogeneous lookup on the weight. This would allow us to save 8 bytes per unique weight.
// Popping off the top of the queue to pick an object will honor the selection probability based
// Remove objects from the queue until it's empty or there is an unexpired object at the front. If
// queues. A cumulative sum is also kept of the total object weights for a queue, which allows for
// Keeps state that determines whether the cumulative weights need to be rebuilt. If any objects