y/y.go
func (t *Throttle) Do() error {
	for {
		select {
		case t.ch <- struct{}{}:
			t.wg.Add(1)
			return nil
		case err := <-t.errCh:
			if err != nil {
				return err
			}
		}
	}
}
func (t *Throttle) Do() error {
	for {
		select {
		case t.ch <- struct{}{}:
			t.wg.Add(1)
			return nil
		case err := <-t.errCh:
			if err != nil {
				return err
			}
		}
	}
}
func ( t * Throttle ) Do ( ) error { for { select { case t . ch <- struct { } { } : t . wg . Add ( 1 ) return nil case err := <- t . errCh : if err != nil { return err } } } }
// Do should be called by workers before they start working. It blocks if there
// are already maximum number of workers working. If it detects an error from
// previously Done workers, it would return it.
Do should be called by workers before they start working . It blocks if there are already maximum number of workers working . If it detects an error from previously Done workers it would return it .