当前位置: 首页>>代码示例>>Python>>正文


Python Signal.receiver_connected方法代码示例

本文整理汇总了Python中blinker.Signal.receiver_connected方法的典型用法代码示例。如果您正苦于以下问题:Python Signal.receiver_connected方法的具体用法?Python Signal.receiver_connected怎么用?Python Signal.receiver_connected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在blinker.Signal的用法示例。


在下文中一共展示了Signal.receiver_connected方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: receiver_disconnected

# 需要导入模块: from blinker import Signal [as 别名]
# 或者: from blinker.Signal import receiver_connected [as 别名]
def receiver_disconnected(self):
        """Emitted after :meth:`disconnect`.

        The sender is the signal instance, and the :meth:`disconnect` arguments
        are passed through: *receiver* and *sender*.

        Note, this signal is emitted **only** when :meth:`disconnect` is
        called explicitly.

        The disconnect signal can not be emitted by an automatic disconnect
        (due to a weakly referenced receiver or sender going out of scope),
        as the receiver and/or sender instances are no longer available for
        use at the time this signal would be emitted.

        An alternative approach is available by subscribing to
        :attr:`receiver_connected` and setting up a custom weakref cleanup
        callback on weak receivers and senders.

        .. versionadded:: 1.2

        """
        return Signal(doc="Emitted after a receiver disconnects.") 
开发者ID:sugarguo,项目名称:Flask_Blog,代码行数:24,代码来源:base.py

示例2: receiver_connected

# 需要导入模块: from blinker import Signal [as 别名]
# 或者: from blinker.Signal import receiver_connected [as 别名]
def receiver_connected(self):
        """Emitted after each :meth:`connect`.

        The signal sender is the signal instance, and the :meth:`connect`
        arguments are passed through: *receiver*, *sender*, and *weak*.

        .. versionadded:: 1.2

        """
        return Signal(doc="Emitted after a receiver connects.") 
开发者ID:sugarguo,项目名称:Flask_Blog,代码行数:12,代码来源:base.py


注:本文中的blinker.Signal.receiver_connected方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。