Help me understand Go 1.9 sync.Map “LoadOrStore” method.
"LoadOrStore" seems like a huge anti pattern: you're either loading, or your storing, you typically "shouldn't" be doing both or either in one operation. Can anyone explain the use case for an API like this? It's obviously a good enough use case for it to be in the 1.9 standard library.
Submitted July 18, 2017 at 07:40PM by JackOhBlades
via reddit http://ift.tt/2vezhog