# eric7.EricUtilities.EricMutexLocker

Module implementing a context manager locking and unlocking a mutex.

### Global Attributes

None

### Classes

EricMutexLocker | Class implementing a context manager locking and unlocking a mutex.

### Functions

None

## EricMutexLocker

Class implementing a context manager locking and unlocking a mutex.

### Derived from

contextlib.AbstractContextManager

### Class Attributes

None

### Class Methods

None

### Methods

EricMutexLocker | Constructor
__enter__ | Special method called when entering the runtime ccontext.
__exit__ | Special method called when exiting the runtime ccontext.

### Static Methods

None

#### EricMutexLocker (Constructor)

EricMutexLocker(mutex)

Constructor

mutex (QMutex or QRecursiveMutex)
  reference to the mutex to be locked

#### EricMutexLocker.__enter__

__enter__()

Special method called when entering the runtime ccontext.

Return:
  reference to the context manager object

Return Type:
  EricOverrideCursor

#### EricMutexLocker.__exit__

__exit__(_exc_type, _exc_value, _traceback)

Special method called when exiting the runtime ccontext.

_exc_type (Class)
  type of an exception raised in the runtime context (unused)
_exc_value (Exception)
  value of an exception raised in the runtime context (unused)
_traceback (Traceback)
  traceback of an exception raised in the runtime context (unused)

Return:
  always returns None to not suppress any exception

Return Type:
  None

Up