code: func (d *requestDistributor) queue(r *distReq) chan distPeer {
  	d.lock.Lock()
  	defer d.lock.Unlock()
  
  	if r.reqOrder == 0 {
  		d.lastReqOrder++
  		r.reqOrder = d.lastReqOrder
  	}
  
  	back := d.reqQueue.Back()
  	if back == nil || r.reqOrder > back.Value.(*distReq).reqOrder {
  		r.element = d.reqQueue.PushBack(r)
  	} else {
  		before := d.reqQueue.Front()
  		for before.Value.(*distReq).reqOrder < r.reqOrder {
  			before = before.Next()
  		}
  		r.element = d.reqQueue.InsertBefore(r, before)
  	}
  
  	if !d.loopNextSent {
  		d.loopNextSent = true
  		d.loopChn <- struct{}{}
  	}
  
  	r.sentChn = make(chan distPeer, 1)
  	return r.sentChn
  }
docs: // queue adds a request to the distribution queue, returns a channel where the
  // receiving peer is sent once the request has been sent (request callback returned).
  // If the request is cancelled or timed out without suitable peers, the channel is
  // closed without sending any peer references to it.