Dan Frank 13 年之前
父节点
当前提交
76ff90cf7e
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      hostpool.go

+ 6 - 0
hostpool.go

@@ -223,6 +223,12 @@ func (p *epsilonGreedyHostPool) Get() HostPoolResponse {
 }
 
 func (p *standardHostPool) getRoundRobin() string {
+	// TODO - will want to replace this with something that runs in a 
+	// goroutine and receives requests on a channel.
+	// The state being protected in that case is really just the currentIdx
+
+	// Question - should I just skip the goroutine shit and select randomly?
+	// Maybe
 	now := time.Now()
 	hostCount := len(p.hostList)
 	for i := range p.hostList {