MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / Lock

Method Lock

base/util_logging_mutex.go:33–37  ·  view source on GitHub ↗

Lock locks m. If the lock is already in use, the calling goroutine blocks until the mutex is available.

()

Source from the content-addressed store, hash-verified

31// If the lock is already in use, the calling goroutine
32// blocks until the mutex is available.
33func (m *LoggingMutex) Lock() {
34 TracefCtx(m.ctx, KeyAll, "Before %s.Lock() %s", m.getName(), GetCallersName(1, true))
35 m.Mutex.Lock()
36 TracefCtx(m.ctx, KeyAll, "After %s.Lock() %s", m.getName(), GetCallersName(1, true))
37}
38
39// Unlock unlocks m.
40// It is a run-time error if m is not locked on entry to Unlock.

Callers 15

TestLoggingMutexFunction · 0.95
nextNSequencesMethod · 0.45
SetConfigMethod · 0.45
GetClientMethod · 0.45
TestConcurrentSetConfigFunction · 0.45
PutMethod · 0.45
PurgeMethod · 0.45
PutMethod · 0.45
PurgeMethod · 0.45
InitMethod · 0.45
RemoveMethod · 0.45
RemoveElementsMethod · 0.45

Calls 3

getNameMethod · 0.95
TracefCtxFunction · 0.85
GetCallersNameFunction · 0.85

Tested by 15

TestLoggingMutexFunction · 0.76
TestConcurrentSetConfigFunction · 0.36
PutMethod · 0.36
PurgeMethod · 0.36
GetNodesMethod · 0.36
AddNodeMethod · 0.36
RemoveNodeMethod · 0.36
GetCountMethod · 0.36
IncrementCountMethod · 0.36
GetSumMethod · 0.36
IncrementSumMethod · 0.36
GetPayloadsMethod · 0.36