def __DeviceProxy__unsubscribe_event(self, event_id):
    """
    unsubscribe_event(self, event_id) -> None

            Unsubscribes a client from receiving the event specified by event_id.

        Parameters :
            - event_id   : (int) is the event identifier returned by the
                            DeviceProxy::subscribe_event(). Unlike in
                            TangoC++ we chech that the event_id has been
                            subscribed in this DeviceProxy.

        Return     : None

        Throws     : EventSystemFailed
    """
    events_del = set()
    timestamp = time.time()
    se = self.__get_event_map()

    with self.__get_event_map_lock():
        # first delete event callbacks that have expire
        for evt_id, (_, expire_time) in self._pending_unsubscribe.items():
            if expire_time <= timestamp:
                events_del.add(evt_id)
        for evt_id in events_del:
            del self._pending_unsubscribe[evt_id]

        # unsubscribe and put the callback in the pending unsubscribe callbacks
        try:
            evt_info = se[event_id]
        except KeyError:
            raise KeyError("This device proxy does not own this subscription " + str(event_id))
        del se[event_id]
        self._pending_unsubscribe[event_id] = evt_info[0], timestamp + _UNSUBSCRIBE_LIFETIME
    self.__unsubscribe_event(event_id)
def __DeviceProxy__unsubscribe_event ( self , event_id ) : events_del = set ( ) timestamp = time . time ( ) se = self . __get_event_map ( ) with self . __get_event_map_lock ( ) : for evt_id , ( _ , expire_time ) in self . _pending_unsubscribe . items ( ) : if expire_time <= timestamp : events_del . add ( evt_id ) for evt_id in events_del : del self . _pending_unsubscribe [ evt_id ] try : evt_info = se [ event_id ] except KeyError : raise KeyError ( "This device proxy does not own this subscription " + str ( event_id ) ) del se [ event_id ] self . _pending_unsubscribe [ event_id ] = evt_info [ 0 ] , timestamp + _UNSUBSCRIBE_LIFETIME self . __unsubscribe_event ( event_id )
unsubscribe_event(self, event_id) -> None

            Unsubscribes a client from receiving the event specified by event_id.

        Parameters :
            - event_id   : (int) is the event identifier returned by the
                            DeviceProxy::subscribe_event(). Unlike in
                            TangoC++ we chech that the event_id has been
                            subscribed in this DeviceProxy.

        Return     : None

        Throws     : EventSystemFailed