So basically it's designed for cases like 'I have N goroutines and each one owns 1/N keys'?
So basically it's designed for cases like 'I have N goroutines and each one owns 1/N keys'?
With those constraints, why not create a small map for each goroutine at that point, and merge the maps afterwards?
fatal error: concurrent map writesI did a big rewrite of a current project, and clearly it was badly designed :(
Also, do you have any good references to proper best practices around concurrent and parallel programming? (in Go.) Like just basic things. Code I can copy and paste without it having obscure race conditions because that use of mutex is absolutely correct, and something that lets me understand the limitations. I feel like it is very easy to do things "wrong" or not notice some edge cases. In C++ I didn't only ever coded single-threaded for this reason. Too many gotchas. Any help would be appreciated.
Was that interpreted as a complaint as well? Is that the problem?
https://news.ycombinator.com/newsguidelines.html
"Please don't comment about the voting on comments. It never does any good, and it makes boring reading."