gemseo / utils

Hide inherited members

locks module

Decorators to lock and protect critical code 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 lock attribute

Parameters:

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

Return type:

Callable[[…], Any]

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

Return type:

Callable[[…], Any]