(func)
return synchronized_wrapper
Decorator for storage-access methods, which synchronizes on a threading
    lock. The parent object must have 'is_closed' and '_sync_lock' attributes.
Decorator for storage-access methods, which synchronizes on a threading
    lock. The parent object must have 'is_closed' and '_sync_lock' attributes.
Decorator for storage - access methods which synchronizes on a threading lock . The parent object must have is_closed and _sync_lock attributes .
def synchronized(func):
    """Decorator for storage-access methods, which synchronizes on a threading
    lock. The parent object must have 'is_closed' and '_sync_lock' attributes.
    """

    @wraps(func)
    def synchronized_wrapper(self, *args, **kwargs):
        with self._sync_lock:
            return func(self, *args, **kwargs)

    return synchronized_wrapper
def synchronized ( func ) : @ wraps ( func ) def synchronized_wrapper ( self , * args , * * kwargs ) : with self . _sync_lock : return func ( self , * args , * * kwargs ) return synchronized_wrapper