Why do you even use a shared map, if you only use distinct keys per goroutine. There probably is a better pattern for your use case.
Am Montag, 13. März 2017 07:39:59 UTC+1 schrieb Albert Tedja: > > Hello, > > I know map itself isn't threadsafe, but I am just wondering how threadsafe > it is if you can be absolutely sure that each goroutine accesses a > different key in the map. > Say, goroutine 1 accesses mymap["1"] > and goroutine 2 accesses mymap["2"] and so on. > > Thank you in advance. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.