4 ms·
Ran the example on my machine and can confirm it's broken. Be careful relying on the results of the Go playground; it has a bunch of differences and probably h
by TomNomNom 7y ago
Ran the example on my machine and can confirm it's broken.
Be careful relying on the results of the Go playground; it has a bunch of differences and probably has GOMAXPROCS set to 1, which most other systems will not.
You need a sync.Mutex or similar protecting your call to append :)