locker

package
v20.10.22+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

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

Constants

This section is empty.

Variables

View Source
var ErrNoSuchLock = locker.ErrNoSuchLock

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

View Source
var New = locker.New

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

Functions

This section is empty.

Types

type Locker

type Locker = locker.Locker

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL