Member
lou_lindgren
Goroutines and loop together in Golang 🥰
1 2 3 4 5 6 7 8 9 10 11 12 13 14
for i := 0; i < fanout; i++ { go func() { for { c.Dec(19) time.Sleep(300e6) } }() go func() { for { c.Inc(47) time.Sleep(400e6) } }() }