本文整理汇总了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)