Hacker News new | ask | show | jobs
by masklinn 1749 days ago
That’s not really the issue here. The issue is that slices are mutation proxies to the backing array, so in a concurrent context you’re sharing mutable state with all that implies. And worse because of the behaviour of append that sharing is not systematic, so it can look like there’s no mutable state sharing… until you append on a slice with leftover capacity and now there is.

The GC only operates on “dead” allocations (afaik it remains non-moving) so it’s not a concern for now.