def test_get_instance_with_concurrent_mode(self, mr_rlock: RLockFactory): try: _rlock = mr_rlock.get_instance() except ValueError as ve: assert "FeatureMode is None. Please configure it as one of 'multirunnable.mode.FeatureMode'." in str( ve), "It should set the FeatureMode first." mr_rlock.feature_mode = FeatureMode.Concurrent _rlock = mr_rlock.get_instance() from threading import RLock assert _rlock is not None and isinstance(_rlock, type(RLock( ))) is True, "This type of RLock instance should be 'threading.RLock'."
def RLock(): """ Returns a recursive lock object """ from multiprocessing.synchronize import RLock return RLock()
def RLock(): from multiprocessing.synchronize import RLock return RLock()
def __init__(self): '''Constructor of Logger.''' self.lock = RLock()