當前位置: 首頁>>代碼示例>>Python>>正文


Python removals.remove方法代碼示例

本文整理匯總了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 = [] 
開發者ID:openstack,項目名稱:oslo.service,代碼行數:20,代碼來源:threadgroup.py

示例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) 
開發者ID:openstack,項目名稱:oslo.service,代碼行數:9,代碼來源:threadgroup.py

示例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) 
開發者ID:openstack,項目名稱:oslo.service,代碼行數:9,代碼來源:threadgroup.py

示例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) 
開發者ID:openstack,項目名稱:oslo.service,代碼行數:9,代碼來源:threadgroup.py


注:本文中的debtcollector.removals.remove方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。