Open
Description
@peterbourgon to avoid edit wars, I invite you to have discussions here.
Many people use the term "benign race condition", including in literature.
The benign race condition I referred to in the checklist would be like this:
var m sync.Map
func foo(k string) string {
v, ok := m.Load(k)
if !ok {
v = compute(k)
m.Store(k, v)
}
return v.(string)
}
Assuming compute()
is safe for concurrent calling and idempotent.
Metadata
Metadata
Assignees
Labels
No labels