runtime/Worker.py
changeset 2271 985973ed701b
parent 2270 d9175daf6522
child 2307 c44692b53736
equal deleted inserted replaced
2270:d9175daf6522 2271:985973ed701b
    74         blocking until job done
    74         blocking until job done
    75         """
    75         """
    76 
    76 
    77         _job = job(*args, **kwargs)
    77         _job = job(*args, **kwargs)
    78 
    78 
    79         if self._threadID == thread.get_ident() or self._threadID is None:
    79         if self._threadID == thread.get_ident():
    80             # if caller is worker thread execute immediately
    80             # if caller is worker thread execute immediately
    81             _job.do()
    81             _job.do()
    82         else:
    82         else:
    83             # otherwise notify and wait for completion
    83             # otherwise notify and wait for completion
    84             self.mutex.acquire()
    84             self.mutex.acquire()