Thanks for the comment, here we are using single thread but to improve the code we could create a new goroutine for each send operation, which would mean that even if one broker isn't ready to receive, the other brokers would still get their notifications.
// UpdatePrice updates the stock price and notifies all brokers
func (s *Stock) UpdatePrice(price float64) {
s.price = price
var wg sync.WaitGroup
wg.Add(len(s.brokers))
for _, broker := range s.brokers {
go func(b chan float64) {
defer wg.Done()
b <- s.price // send the updated price to the broker
}(broker)
}
wg.Wait()
}