I know this is a simple example but channels don't guarantee exclusive access, if you modify newData (it being a pointer) anywhere else in your code you'll probably run into a race condition.
(Also there a few typos in your code, like the name of the channel in main and d.list which should be d.numbers).
Eduardo Bonzi da Conceição
Backend Developer
I know this is a simple example but channels don't guarantee exclusive access, if you modify
newData(it being a pointer) anywhere else in your code you'll probably run into a race condition.(Also there a few typos in your code, like the name of the channel in
mainandd.listwhich should bed.numbers).