def _synced ( method , self , args , kwargs ) : with self . _lock : return method ( * args , * * kwargs )
python set a thread safe flag
Underlying synchronized wrapper .
def _synced(method, self, args, kwargs):
    """Underlying synchronized wrapper."""
    with self._lock:
        return method(*args, **kwargs)