Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
Lock represents a locked key in a mutex map, normally only returned as an unlock function but wrapped here to provide a storable type with metadata for context values.
func LockCtx ¶
func LockCtx(mm *mutexes.MutexMap, ctx context.Context, key string) (child context.Context, lock *Lock)
LockCtx will check given context for lock, else acquire a lock on the mutex at key in the map.
func RLockCtx ¶
func RLockCtx(mm *mutexes.MutexMap, ctx context.Context, key string) (child context.Context, lock *Lock)
RLockCtx will check given context for rlock, else acquire an rlock on the mutex at key in the map.
Click to show internal directories.
Click to hide internal directories.