本文整理匯總了Python中debtcollector.removals.remove方法的典型用法代碼示例。如果您正苦於以下問題:Python removals.remove方法的具體用法?Python removals.remove怎麽用?Python removals.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類debtcollector.removals
的用法示例。
在下文中一共展示了removals.remove方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: stop_timers
# 需要導入模塊: from debtcollector import removals [as 別名]
# 或者: from debtcollector.removals import remove [as 別名]
def stop_timers(self, wait=False):
"""Stop all timers in the group and remove them from the group.
No new invocations of timers will be triggered after they are stopped,
but calls that are in progress will not be interrupted.
To wait for in-progress calls to complete, pass ``wait=True`` - calling
:func:`wait` will not have the desired effect as the timers will have
already been removed from the group.
:param wait: If true, block until all timers have been stopped before
returning.
"""
for timer in self.timers:
timer.stop()
if wait:
self._wait_timers()
self.timers = []
示例2: _on_thread_done
# 需要導入模塊: from debtcollector import removals [as 別名]
# 或者: from debtcollector.removals import remove [as 別名]
def _on_thread_done(_greenthread, group, thread):
"""Callback function to be passed to GreenThread.link() when we spawn().
Calls the :class:`ThreadGroup` to notify it to remove this thread from
the associated group.
"""
group.thread_done(thread)
示例3: thread_done
# 需要導入模塊: from debtcollector import removals [as 別名]
# 或者: from debtcollector.removals import remove [as 別名]
def thread_done(self, thread):
"""Remove a completed thread from the group.
This method is automatically called on completion of a thread in the
group, and should not be called explicitly.
"""
self.threads.remove(thread)
示例4: timer_done
# 需要導入模塊: from debtcollector import removals [as 別名]
# 或者: from debtcollector.removals import remove [as 別名]
def timer_done(self, timer):
"""Remove a timer from the group.
:param timer: The timer object returned from :func:`add_timer` or its
analogues.
"""
self.timers.remove(timer)