Mutex v1.1.1 Mutex.Lock

This module defines a struct containing the key(s) locked with all the locking functions in Mutex.

Link to this section Summary

Types

t()

The struct containing the key(s) locked during a lock operation. :type specifies wether there is one or more keys.

Functions

Returns the metadata associated with the lock. The metadata is given to the mutex on initialization

Link to this section Types

Link to this type

t()

t() :: %Mutex.Lock{
  key: nil | Mutex.key(),
  keys: nil | [Mutex.key()],
  meta: any(),
  type: :single | :multi
}

The struct containing the key(s) locked during a lock operation. :type specifies wether there is one or more keys.

Link to this section Functions

Link to this function

get_meta(map)

get_meta(lock :: Mutex.Lock.t()) :: any()

Returns the metadata associated with the lock. The metadata is given to the mutex on initialization:

Mutex.start_link(name: MyMutex, meta: metadata)