예제 #1
0
 def one_exclusive():
     time.sleep(0.1)
     w = RWLockWrapper(lock, is_shared=False)
     with w:
         pass
예제 #2
0
 def two_shared():
     r = RWLockWrapper(lock)
     with r:
         time.sleep(0.2)
         with r:
             pass