code: func (sh *SyncHandler) enumeratePendingBlobs(dst chan<- blob.SizedRef, intr <-chan struct{}) error {
  	defer close(dst)
  	sh.mu.Lock()
  	var toSend []blob.SizedRef
  	{
  		n := len(sh.needCopy)
  		const maxBatch = 1000
  		if n > maxBatch {
  			n = maxBatch
  		}
  		toSend = make([]blob.SizedRef, 0, n)
  		for br, size := range sh.needCopy {
  			toSend = append(toSend, blob.SizedRef{Ref: br, Size: size})
  			if len(toSend) == n {
  				break
  			}
  		}
  	}
  	sh.mu.Unlock()
  	for _, sb := range toSend {
  		select {
  		case dst <- sb:
  		case <-intr:
  			return nil
  		}
  	}
  	return nil
  }
docs: // enumeratePendingBlobs yields blobs from the in-memory pending list (needCopy).
  // This differs from enumerateQueuedBlobs, which pulls in the on-disk sorted.KeyValue store.