(wrapped: Callable[..., Any])
return _wrapper
The missing @synchronized decorator

    https://git.io/vydTA
The missing @synchronized decorator
The missing @synchronized decorator
def synchronized(wrapped: Callable[..., Any]) -> Any:
    """The missing @synchronized decorator

    https://git.io/vydTA"""
    _lock = threading.RLock()

    @functools.wraps(wrapped)
    def _wrapper(*args, **kwargs):
        with _lock:
            return wrapped(*args, **kwargs)

    return _wrapper
def synchronized ( wrapped : Callable [ ... , Any ] ) -> Any : _lock = threading . RLock ( ) @ functools . wraps ( wrapped ) def _wrapper ( * args , * * kwargs ) : with _lock : return wrapped ( * args , * * kwargs ) return _wrapper