MCPcopy
hub / github.com/brightio/penelope / terminate

Method terminate

penelope.py:428–440  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

426 if hasattr(__class__, 'render_lock'): __class__.render_lock.release()
427
428 def terminate(self):
429 if self.queue and current_thread() != self.trace_thread: self.queue.join(); self.queue.put(None)
430 if hasattr(__class__, 'render_lock'): __class__.render_lock.acquire()
431 try:
432 if not self: return
433 self.active = False
434 if hasattr(self, 'eta'): del self.eta
435 if not any(__class__.pbars):
436 self.render()
437 print("\x1b[?25h" + '\n' * len(__class__.pbars), end='', flush=True)
438 __class__.pbars.clear()
439 finally:
440 if hasattr(__class__, 'render_lock'): __class__.render_lock.release()
441
442
443class PBarReader:

Callers 5

__exit__Method · 0.95
updateMethod · 0.95
downloadMethod · 0.95
uploadMethod · 0.95
url_to_bytesFunction · 0.95

Calls 2

renderMethod · 0.95
clearMethod · 0.80

Tested by

no test coverage detected