logoalt Hacker News

amelius • yesterday at 4:12 PM • 1 reply • view on HN

I suppose that if you create a map in one thread, and then access it from another thread, then that might cause segmentation faults? Because map is a type that is implemented in C.


Replies

__s • yesterday at 10:25 PM

Yes, writing to maps isn't threadsafe, hence sync.Map. I learned this the hard way