def activate(self):
"""
Called from other parts of the system to activate this Component.
This will start its thread or will notify it to continue.
"""
if self.is_terminated():
return
if not self.active():
self.start()
else:
self.trace_locks("act - lock")
try:
with self._lock:
if self.status in (StatusValues.DORMANT,
StatusValues.SUSP_FIPE):
self._can_go.notify()
self.trace_locks("act - signal")
except GreenletExit as e:
return
finally:
self.trace_locks("act - unlock")
评论列表
文章目录