MCPcopy
hub / github.com/dgraph-io/dgraph / Lock

Method Lock

x/lock.go:28–31  ·  view source on GitHub ↗

Lock locks the safe mutex.

()

Source from the content-addressed store, hash-verified

26
27// Lock locks the safe mutex.
28func (s *SafeMutex) Lock() {
29 s.m.Lock()
30 AssertTrue(atomic.AddInt32(&s.writer, 1) == 1)
31}
32
33// Unlock unlocks the safe mutex.
34func (s *SafeMutex) Unlock() {

Callers 15

SetRaftMethod · 0.45
SetConfStateMethod · 0.45
DoneConfChangeMethod · 0.45
storeConfChangeMethod · 0.45
SetPeerMethod · 0.45
DeletePeerMethod · 0.45
joinClusterMethod · 0.45
RemoveAllMethod · 0.45
removeMethod · 0.45
ConnectMethod · 0.45
SetUnhealthyMethod · 0.45
listenToHeartbeatMethod · 0.45

Calls 1

AssertTrueFunction · 0.70

Tested by 9

incrementFunction · 0.36
refreshTokenMethod · 0.36
TestStringIndexFunction · 0.36
TestCountIndexFunction · 0.36
TestLimiterDeadlockFunction · 0.36
commitMutationMethod · 0.36
ExecuteMethod · 0.36