MCPcopy
hub / github.com/dropbox/godropbox / TryLock

Method TryLock

lockstore/store.go:21–21  ·  view source on GitHub ↗

TryLock attempts to acquire the lock given the timeout. Returns true if it successfully acquire the lock. False otherwise

(key string, timeout time.Duration)

Source from the content-addressed store, hash-verified

19 // TryLock attempts to acquire the lock given the timeout. Returns
20 // true if it successfully acquire the lock. False otherwise
21 TryLock(key string, timeout time.Duration) (success bool)
22
23 // Unlock unlocks the mutex that is used for the given key
24 Unlock(key string)

Callers 6

testLockKeyParallelMethod · 0.65
TestSimpleMethod · 0.65
TestSharedSimpleMethod · 0.65
TestReuseSimpleMethod · 0.65
performTransitionFunction · 0.65
testLockKeyParallelMethod · 0.65

Implementers 3

_LockStoreImpcontainer/concurrent/lockstore/store.g
FileLocksys/filelock/filelock.go
_LockStoreImplockstore/store.go

Calls

no outgoing calls

Tested by 6

testLockKeyParallelMethod · 0.52
TestSimpleMethod · 0.52
TestSharedSimpleMethod · 0.52
TestReuseSimpleMethod · 0.52
performTransitionFunction · 0.52
testLockKeyParallelMethod · 0.52