Manager.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
def Subscriber(self, channel_name, registrationId=""):

        self._mgr_lock.acquire()
        self._logger.debug("Requesting Subscriber for Channel:" + str(channel_name) )
        sub = None
        try:
            if self._ecm:
                ereg = EventChannelManager.EventRegistration( channel_name = channel_name, reg_id = registrationId)

                self._logger.debug("Requesting Channel:" + str(channel_name) + " from Domain's EventChannelManager ")
                registration = self._ecm.registerResource( ereg )

                sub = EM_Subscriber( self, registration )

                self._logger.debug("Channel:" + str(channel_name) + " Reg-Id:" + str(registration.reg.reg_id))

                self._registrations.append( registration )

        except:
            #print traceback.format_exc()
            self._logger.error("Unable to create Subscriber for Channel:" + str(channel_name ))
        finally:
            self._mgr_lock.release()

        return sub
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号