MCPcopy Create free account
hub / github.com/ActiveState/code / close

Method close

recipes/Python/577505_Command_Threads/recipe-577505.py:72–87  ·  view source on GitHub ↗

blocking call, return after close/cancel is done.

(self, timeout=None)

Source from the content-addressed store, hash-verified

70 self._condition.release()
71
72 def close(self, timeout=None):
73 """ blocking call, return after close/cancel is done.
74 """
75 undoneJobs = []
76 self._condition.acquire()
77 if self._status == 'DONE':
78 self._condition.release()
79 return
80
81 self._status = 'DONE'
82 self._condition.notifyAll()
83 while not self._queue.empty():
84 undoneJobs.append(self._queue.get())
85 self._condition.release()
86 self.join(timeout)
87 return undoneJobs
88
89 def pause(self, timeout=None):
90 """ non-blocking call.

Callers 13

mainFunction · 0.45
mainFunction · 0.45
recipe-577548.pyFile · 0.45
execute_sqlFunction · 0.45
stripAxisCodeFunction · 0.45
simpanFunction · 0.45
beepFunction · 0.45
recipe-577554.pyFile · 0.45
recipe-577502.pyFile · 0.45
mainFunction · 0.45
serveclientFunction · 0.45
recipe-577505.pyFile · 0.45

Calls 6

acquireMethod · 0.45
releaseMethod · 0.45
emptyMethod · 0.45
appendMethod · 0.45
getMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected