def one_exclusive(): time.sleep(0.1) w = RWLockWrapper(lock, is_shared=False) with w: pass
def two_shared(): r = RWLockWrapper(lock) with r: time.sleep(0.2) with r: pass