Advertisement
Guest User

Untitled

a guest
Sep 15th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.39 KB | None | 0 0
  1. func (strategy *strategy) runBasicDecisions(t ticker, start bool) {
  2.     var basicDecisions = []func(status chan bool, t ticker, start bool, wg *sync.WaitGroup) bool{
  3.         strategy.BuyDecisions.Percent.shouldBuy,
  4.     }
  5.  
  6.     var wg sync.WaitGroup
  7.     status := make(chan bool, len(basicDecisions))
  8.  
  9.     for _, decision := range basicDecisions {
  10.         wg.Add(1)
  11.         go decision(status, t, start, &wg)
  12.     }
  13.  
  14.     wg.Wait()
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement