Permalink
Browse files

cache/namedmemcache: Fix data race

  • Loading branch information...
bep committed Dec 27, 2018
1 parent cc35195 commit 3f3187de0f62107da19d9341aebd1d8414bff0ea
Showing with 0 additions and 5 deletions.
  1. +0 −5 cache/namedmemcache/named_cache.go
@@ -68,11 +68,6 @@ func (c *Cache) GetOrCreate(key string, create func() (interface{}, error)) (int
c.nlocker.Lock(key)
defer c.nlocker.Unlock(key)

// Double check
if entry, found := c.cache[key]; found {
return entry.value, entry.err
}

// Create it.
value, err := create()

0 comments on commit 3f3187d

Please sign in to comment.