cobald.daemon.runners.guard module

cobald.daemon.runners.guard.exclusive(via=<built-in function allocate_lock>) Callable[[C], C][source]

Mark a callable as exclusive

Parameters:

via – factory for a Lock to guard the callable

Guards the callable against being entered again before completion. Explicitly raises a RuntimeError on violation.

Note:

If applied to a method, it is exclusive across all instances.