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

Method Unlock

x/lock.go:34–37  ·  view source on GitHub ↗

Unlock unlocks the safe mutex.

()

Source from the content-addressed store, hash-verified

32
33// Unlock unlocks the safe mutex.
34func (s *SafeMutex) Unlock() {
35 AssertTrue(atomic.AddInt32(&s.writer, -1) == 0)
36 s.m.Unlock()
37}
38
39// AssertLock asserts whether the lock is being held.
40func (s *SafeMutex) AssertLock() {

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