MCPcopy Create free account
hub / github.com/Masterminds/glide / Lock

Function Lock

cache/cache.go:203–213  ·  view source on GitHub ↗

Lock locks a particular key name

(name string)

Source from the content-addressed store, hash-verified

201
202// Lock locks a particular key name
203func Lock(name string) {
204 lockSync.Lock()
205 m, ok := lockData[name]
206 if !ok {
207 m = &sync.Mutex{}
208 lockData[name] = m
209 }
210 lockSync.Unlock()
211 msg.Debug("Locking %s", name)
212 m.Lock()
213}
214
215// Unlock unlocks a particular key name
216func Unlock(name string) {

Callers

nothing calls this directly

Calls 1

DebugMethod · 0.80

Tested by

no test coverage detected