News for hackers. Stuff that matters.
Re:Data Race Patterns in Go by meowface on Friday June 10, 2022 @08:09PM (#31700713)
Yes, this majorly tripped me up when working on my first big Go project. Spent days hunting for a non-deterministic data corruption issue which was caused by this. It's definitely my fault for not fully reading the documentation and not realizing that append may (and often does) mutate the slice, but I was indeed misled by the `x = append(x, ...)` syntax into assuming it only works off of a copy without modifying the original.

There are no comments on this comment yet.