Documentation ¶
Overview ¶
Package locker provides a concurrency control mechanism to manage locks based on unique identifiers. It allows multiple goroutines to safely acquire and release locks associated with specific IDs, ensuring that resources tied to these IDs are not accessed concurrently. The package uses reference counting to clean up unused locks, optimizing memory usage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Locker ¶
type Locker struct {
// contains filtered or unexported fields
}
Locker is a struct that manages a collection of locks. Each lock is associated with a unique ID and is reference counted.
Click to show internal directories.
Click to hide internal directories.