docker: github.com/docker/docker/pkg/locker Index | Files

package locker

import "github.com/docker/docker/pkg/locker"

Package locker provides a mechanism for creating finer-grained locking to help free up more global locks to handle other tasks.

The implementation looks close to a sync.Mutex, however the user must provide a reference to use to refer to the underlying lock when locking and unlocking, and unlock may generate an error.

If a lock with a given name does not exist when `Lock` is called, one is created. Lock references are automatically cleaned up on `Unlock` if nothing else is waiting for the lock.

Index

Package Files

locker.go

Variables

var ErrNoSuchLock = locker.ErrNoSuchLock

ErrNoSuchLock is returned when the requested lock does not exist Deprecated: use github.com/moby/locker.ErrNoSuchLock

var New = locker.New

New creates a new Locker Deprecated: use github.com/moby/locker.New

type Locker Uses

type Locker = locker.Locker

Locker provides a locking mechanism based on the passed in reference name Deprecated: use github.com/moby/locker.Locker

Package locker imports 1 packages (graph) and is imported by 1419 packages. Updated 2020-09-16. Refresh now. Tools for package owners.