Exemple #1
0
 def __init__(  # pylint: disable=R0913
         self, docker_client, semaphore, queue, name, config):
     _Verbose.__init__(self)
     Thread.__init__(self)
     self.config = config
     self.docker_client = docker_client
     self.image = dict({})
     self.name = name
     self.queue = queue
     self.semaphore = semaphore
Exemple #2
0
 def __init__(  # pylint: disable=R0913
         self, docker_client, semaphore, queue, name, config):
     _Verbose.__init__(self)
     Thread.__init__(self)
     self.color = Color()
     self.container = config
     self.docker_client = docker_client
     self.name = name
     self.queue = queue
     self.semaphore = semaphore
Exemple #3
0
 def __init__(self, lock=None, verbose=None):
     _Verbose.__init__(self, verbose)
     if lock is None:
         lock = RLock()
     self.__lock = lock
     # Export the lock's acquire() and release() methods
     self.acquire = lock.acquire
     self.release = lock.release
     # If the lock defines _release_save() and/or _acquire_restore(),
     # these override the default implementations (which just call
     # release() and acquire() on the lock).  Ditto for _is_owned().
     try:
         self._release_save = lock._release_save
     except AttributeError:
         pass
     try:
         self._acquire_restore = lock._acquire_restore
     except AttributeError:
         pass
     try:
         self._is_owned = lock._is_owned
     except AttributeError:
         pass
     self.__waiters = []
Exemple #4
0
 def __init__(self, lock=None, verbose=None):
     _Verbose.__init__(self, verbose)
     if lock is None:
         lock = RLock()
     self.__lock = lock
     # Export the lock's acquire() and release() methods
     self.acquire = lock.acquire
     self.release = lock.release
     # If the lock defines _release_save() and/or _acquire_restore(),
     # these override the default implementations (which just call
     # release() and acquire() on the lock).  Ditto for _is_owned().
     try:
         self._release_save = lock._release_save
     except AttributeError:
         pass
     try:
         self._acquire_restore = lock._acquire_restore
     except AttributeError:
         pass
     try:
         self._is_owned = lock._is_owned
     except AttributeError:
         pass
     self.__waiters = []
Exemple #5
0
 def __init__(self, verbose=None):
     _Verbose.__init__(self, verbose)
     self.__cond = Condition(Lock())
     self.__flag = False
Exemple #6
0
 def __init__(self, verbose=None):
     _Verbose.__init__(self, verbose)
     self.__cond = Condition(Lock())
     self.__flag = False