parameters: (self, handle, event = None)
return_statement: return existed
docstring: Stop looking in a (set of) zone(s)
docstring_summary: Stop looking in a (set of) zone(s)
docstring_tokens: Stop looking in a ( set of ) zone ( s )
function: def removeInterest(self, handle, event = None):
          """
          Stop looking in a (set of) zone(s)
          """
          # print 'base.cr.removeInterest(',handle,'):',base.clock.getFrameCount()
  
          assert DoInterestManager.notify.debugCall()
          assert isinstance(handle, InterestHandle)
          existed = False
          if not event:
              event = self._getAnonymousEvent('removeInterest')
          handle = handle.asInt()
          if handle in DoInterestManager._interests:
              existed = True
              intState = DoInterestManager._interests[handle]
              if event:
                  messenger.send(self._getRemoveInterestEvent(),
                                 [event, intState.parentId, intState.zoneIdList])
              if intState.isPendingDelete():
                  self.notify.warning(
                      'removeInterest: interest %s already pending removal' %
                      handle)
                  # this interest is already pending delete, so let's just tack this
                  # callback onto the list
                  if event is not None:
                      intState.addEvent(event)
              else:
                  if len(intState.events) > 0:
                      # we're not pending a removal, but we have outstanding events?
                      # probably we are waiting for an add/alter complete.
                      # should we send those events now?
                      assert self.notify.warning('removeInterest: abandoning events: %s' %
                                                 intState.events)
                      intState.clearEvents()
                  intState.state = InterestState.StatePendingDel
                  contextId = self._getNextContextId()
                  intState.context = contextId
                  if event:
                      intState.addEvent(event)
                  self._sendRemoveInterest(handle, contextId)
                  if not event:
                      self._considerRemoveInterest(handle)
                  if self.__verbose():
                      print('CR::INTEREST.removeInterest(handle=%s, event=%s)' % (
                          handle, event))
          else:
              DoInterestManager.notify.warning(
                  "removeInterest: handle not found: %s" % (handle))
          assert self.printInterestsIfDebug()
          return existed
function_tokens: def removeInterest ( self , handle , event = None ) : # print 'base.cr.removeInterest(',handle,'):',base.clock.getFrameCount() assert DoInterestManager . notify . debugCall ( ) assert isinstance ( handle , InterestHandle ) existed = False if not event : event = self . _getAnonymousEvent ( 'removeInterest' ) handle = handle . asInt ( ) if handle in DoInterestManager . _interests : existed = True intState = DoInterestManager . _interests [ handle ] if event : messenger . send ( self . _getRemoveInterestEvent ( ) , [ event , intState . parentId , intState . zoneIdList ] ) if intState . isPendingDelete ( ) : self . notify . warning ( 'removeInterest: interest %s already pending removal' % handle ) # this interest is already pending delete, so let's just tack this # callback onto the list if event is not None : intState . addEvent ( event ) else : if len ( intState . events ) > 0 : # we're not pending a removal, but we have outstanding events? # probably we are waiting for an add/alter complete. # should we send those events now? assert self . notify . warning ( 'removeInterest: abandoning events: %s' % intState . events ) intState . clearEvents ( ) intState . state = InterestState . StatePendingDel contextId = self . _getNextContextId ( ) intState . context = contextId if event : intState . addEvent ( event ) self . _sendRemoveInterest ( handle , contextId ) if not event : self . _considerRemoveInterest ( handle ) if self . __verbose ( ) : print ( 'CR::INTEREST.removeInterest(handle=%s, event=%s)' % ( handle , event ) ) else : DoInterestManager . notify . warning ( "removeInterest: handle not found: %s" % ( handle ) ) assert self . printInterestsIfDebug ( ) return existed