summaryrefslogtreecommitdiff
path: root/libpod/lock/lock.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-08-23 13:48:07 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-01-04 09:51:09 -0500
commita364b656eaef1be5329abfd02d3fcd2dbcd37d64 (patch)
tree454478de97e3d1831b6b64acdeaeafac9b9052e7 /libpod/lock/lock.go
parente73484c176839b2f2adf3d07cc09222a7b75bf69 (diff)
downloadpodman-a364b656eaef1be5329abfd02d3fcd2dbcd37d64.tar.gz
podman-a364b656eaef1be5329abfd02d3fcd2dbcd37d64.tar.bz2
podman-a364b656eaef1be5329abfd02d3fcd2dbcd37d64.zip
Add lock manager to libpod runtime
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod/lock/lock.go')
-rw-r--r--libpod/lock/lock.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/libpod/lock/lock.go b/libpod/lock/lock.go
index 5258c641f..73c1fdcf7 100644
--- a/libpod/lock/lock.go
+++ b/libpod/lock/lock.go
@@ -41,11 +41,14 @@ type Locker interface {
// Lock locks the lock.
// This call MUST block until it successfully acquires the lock or
// encounters a fatal error.
- Lock() error
+ // All errors must be handled internally, as they are not returned. For
+ // the most part, panicking should be appropriate.
+ Lock()
// Unlock unlocks the lock.
- // A call to Unlock() on a lock that is already unlocked lock MUST
- // error.
- Unlock() error
+ // All errors must be handled internally, as they are not returned. For
+ // the most part, panicking should be appropriate.
+ // This includes unlocking locks which are already unlocked.
+ Unlock()
// Free deallocates the underlying lock, allowing its reuse by other
// pods and containers.
// The lock MUST still be usable after a Free() - some libpod instances