gemseo / utils

locks module

Decorators to lock and protect critical code sections

Functions:

synchronized(wrapped)

A synchronization decorator to avoid concurrent access of critical sections.

synchronized_hashes(wrapped)

A synchronization decorator to avoid concurrent access of critical sections.

gemseo.utils.locks.synchronized(wrapped)[source]

A synchronization decorator to avoid concurrent access of critical sections.

The wrapped function must be a method of an object with a self.lock attribute

Parameters

wrapped – function to be protected

gemseo.utils.locks.synchronized_hashes(wrapped)[source]

A synchronization decorator to avoid concurrent access of critical sections.

The wrapped function must be a method of an object with a self.lock_hashes attribute

Parameters

wrapped – function to be protected