equal
deleted
inserted
replaced
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() |