gemseo.utils.locks module#

Decorators to lock and protect critical code sections.

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 lock attribute

Parameters:

wrapped (Callable[[...], Any]) -- The function to be protected.

Return type:

Callable[[...], Any]

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 (Callable[[...], Any]) -- The function to be protected.

Return type:

Callable[[...], Any]