runs all handlers, calls the remover method if a handler should be removed
176213
def run_xpath_handlers(ctx, handlers, remover)
      handlers.each do |h|
        if (not ctx.done?) and (h.match?(ctx.stanza))
          ctx['xpath.handler'] = h
          ctx = h.call(ctx)
          raise RuntimeError, "xpath handlers should return a Context" unless ctx.is_a?(Context)
          send remover, h unless ctx.reuse_handler?
        end
      end
    end
1152354
def delete(self, handle):
        
        self._check_session()
        self._rest.delete_request('objects', str(handle))
1051275
function runHandler(plugin, handler, cancel) {
  return function runHandlerDelegate(data) {
    if (!data) {
      return Promise.resolve();
    }

    return Promise
      .resolve(handler.handler(data, plugin, cancel))
      .then(function(result) {
        return data.configure(result);
      });
  };
}
316027
function runTheHandler(inboundMessage) {
    let handler = convo.handler;
    convo.handler = null;
    
    let result = handler.apply(convo, [convo, inboundMessage]);

    
    if (result === IS_WAIT_FUNCTION) {
      // reset the handler to wait again
      convo.handler = handler;
    }
    // this was a real interaction so reset the timeout and wait count
    else {
      fuse.logger.verbose('Ran handler');
      resetTimeout();
      convo.wait_count = 0;
    }
  }
820302
def _attach_handler_events(self, handler, events=None):
        
        if not events:
            events = self
        for name in events:
            meth = getattr(handler, name, None)
            if meth:
                self.events[name] += meth
164636
def run(self):
        '''
        '''
        handle = 0
        handlers = {
           Modes.ONCE: once,
           Modes.CRAWL: crawl,
           Modes.INTERACTIVE: interactive,
        }
        handler = handlers[self.mode]
        patch_sysargv(self.url or 'plugin://%s/' % self.plugin.id, handle)
        return handler(self.plugin)
813902
def _run(self):  # pylint: disable=method-hidden
        
        try:
            self.event_stop.wait()
        except gevent.GreenletExit:  # killed without exception
            self.event_stop.set()
            gevent.killall(self.greenlets)  # kill children
            raise  # re-raise to keep killed status
        except Exception:
            self.stop()  # ensure cleanup and wait on subtasks
            raise
405578
def unregister(self, handler):
        
        for handler_obj in self.handlers:
            registered = handler_obj.handler
            if handler is registered:
                self.handlers.remove(handler_obj)
                return True
        raise ValueError('This handler is not registered!')
748488
function(context, handlers/*, params*/ ) {
        var args = this.slice(arguments)
        args.shift()
        args.shift()
        this.each(handlers, function(handler) {
            if (handler) handler.apply(context, args)
        })
    }
482264
function remove(handle) {
          return !(
              handle.callback === callback
            && (!context ? true : handle.context === context)
          );
        }
1157330
function(events, handler) {
        if (events === undefined) {
            return;
        }

        var handlers = this.handlers;
        each(splitStr(events), function(event) {
            if (!handler) {
                delete handlers[event];
            } else {
                handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);
            }
        });
        return this;
    }
851760
def _delete_handler(self, handler_class):
        """"""
        to_remove = self._get_handler(handler_class)
        if not to_remove:
            logging.warning('Error we should have an element to remove')
        else:
            self.handlers.remove(to_remove)
            self.logger.removeHandler(to_remove)
1268944
def run(signals=Signal.list.keys)
            if mounted?
                begin
                    traps = trap_signals(*signals)
                    self.loop()
                ensure
                    traps.each { |t| Signal.trap(t,"DEFAULT") }
                    unmount()
                end
            end
        end
699676
def remove_stream_handlers(logger=None):
    
    if not isinstance(logger, logging.Logger):
        logger = logging.getLogger(logger)

    new_handlers = []
    for handler in logger.handlers:
        # FileHandler is a subclass of StreamHandler so
        # 'if not a StreamHandler' does not work
        if (isinstance(handler, logging.FileHandler) or
            isinstance(handler, logging.NullHandler) or
            (isinstance(handler, logging.Handler) and not
                isinstance(handler, logging.StreamHandler))):
            new_handlers.append(handler)
    logger.handlers = new_handlers
989177
def Run(self):
        

        while True:

            try:
                events = self.poller.poll()
            except KeyboardInterrupt:
                self.context.destroy()
                sys.exit()

            self.Handle_Events(events)
768487
def call(*args, &block)
      if @handlers.empty?
        return false
      else
        # TODO: Add some form of error-handling
        @handlers.each do |h|
          h.call(*args, &block)
        end

        return true
      end
    end
68852
function deleteDelegatedHandler(eventOptions = {}) {
    const { key } = eventOptions;
    const def = defs.get(this);

    if (key && key in def.keys) {
        triggerOne(this, '_asterisk:remove', eventOptions);
    }
}