MDGSF Software Engineer

[GO] A simple load balancer

2017-11-16
GO

func Run() {
   in, out := make(chan *Work), make(chan *Work)
   for i := 0; i < NumWorkers; i++ {
       go worker(in, out)
   }
   go sendLotsOfWork(in)
   receiveLotsOfResults(out)
}

weixingongzhonghao

Comments

Content