There's more...

It's interesting to see the Python internals for the condition synchronization mechanism. The internal class _Condition creates an RLock() object if no existing lock has been passed to the class's constructor. Also, the lock will be managed when acquire() and released() are called:

class _Condition(_Verbose):
def __init__(self, lock=None, verbose=None):
_Verbose.__init__(self, verbose)
if lock is None:
lock = RLock()
self.__lock = lock
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.132.194