zoukankan      html  css  js  c++  java
  • 源码 进程终止时间

    pikaadapterslocking_connection.py


    def start_consuming(self):
    """Processes I/O events and dispatches timers and `basic_consume`
    callbacks until all consumers are cancelled.

    NOTE: this blocking function may not be called from the scope of a
    pika callback, because dispatching `basic_consume` callbacks from this
    context would constitute recursion.

    :raises pika.exceptions.RecursionError: if called from the scope of a
    `BlockingConnection` or `BlockingChannel` callback

    """
    # Check if called from the scope of an event dispatch callback
    with self.connection._acquire_event_dispatch() as dispatch_allowed:
    if not dispatch_allowed:
    raise exceptions.RecursionError(
    'start_consuming may not be called from the scope of '
    'another BlockingConnection or BlockingChannel callback')

    # Process events as long as consumers exist on this channel
    while self._consumer_infos:
    self.connection.process_data_events(time_limit=None)


    通过分析源码,得出进程终止时间

    消费服务的存活不能由start_consuming决定。









  • 相关阅读:
    asp.net 启动关闭iis
    vue 界面关闭触发事件 ---实例销毁之前调用
    ElmentUI 设置禁止点击遮罩关闭 el-dialog 弹窗
    C#反射
    SQL Server 创建游标(cursor)
    文件解压缩
    文件流操作
    Linq查询
    C#线程 多线程 进程
    匿名类型和反射
  • 原文地址:https://www.cnblogs.com/rsapaper/p/10511705.html
Copyright © 2011-2022 走看看