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

Method pause

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

non-blocking call.

(self, timeout=None)

Source from the content-addressed store, hash-verified

87 return undoneJobs
88
89 def pause(self, timeout=None):
90 """ non-blocking call.
91 """
92 self._condition.acquire()
93 if self._status == 'DONE':
94 self._condition.release()
95 return
96 self._status = 'SLEEPING'
97 self._condition.notifyAll()
98 self._condition.release()
99
100 def resume(self):
101 """ non-blocking call.

Callers 1

recipe-577505.pyFile · 0.45

Calls 2

acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected