Send out an event and call it's associated functions

        :param event: Name of the event to trigger
9363
def emit(self, event, *args, **kwargs):
        
        for func in self._registered_events[event].values():
            func(*args, **kwargs)
1168979
def emit(self, event, *event_args):
        
        listeners = self._listeners[event][:]
        for listener in listeners:
            args = list(event_args) + list(listener.user_args)
            result = listener.callback(*args)
            if result is False:
                self.off(event, listener.callback)
925284
def dispatch(self, event):
        

        for event_types, queues in self.queues.items():
            if event.type & event_types:
                for queue in queues:
                    queue.put(event)
341601
def _emit(self, event, document, *args, **kwargs):
        
        self.handler_registrar().apply(event, document, *args, **kwargs)
64025
def trigger_event(self, module_name, event):
        
        if module_name:
            self._py3_wrapper.events_thread.process_event(module_name, event)
278341
def bind(self, event_name, callback, *args, **kwargs):
        
        self.event_callbacks[event_name].append((callback, args, kwargs))
536608
def focusInEvent(self, event):
        
        self.focused_in.emit(event)
        super(CodeEdit, self).focusInEvent(event)
1005174
def trigger(self, *args, **kargs):
        
        event = args[0]

        if isinstance(event, str) and ' ' in event:
            event = event.split(' ')  # split event names ...

        if isinstance(event, list):  # event is a list of events
            for each in event:
                self.events[each].trigger(*args[1:], **kargs)
        else:
            self.events[event].trigger(*args[1:], **kargs)
158727
def _modify_event(self, event_name, method, func):
        
        if event_name not in self.ALL_EVENTS:
            raise TypeError(('event_name ("%s") can only be one of the '
                             'following: %s') % (event_name,
                                                 repr(self.ALL_EVENTS)))
        if not isinstance(func, collections.Callable):
            raise TypeError(('func must be callable to be added as an '
                             'observer.'))
        getattr(self._events[event_name], method)(func)
739285
def send(self, event):
        
        try:
            processed_event = self.process_event(event)
        except EventEmissionExit:
            return
        else:
            self.send_to_backends(processed_event)
359582
def trigger(self, event_name, data):
        
        if self.connection:
            if event_name.startswith("client-"):
                if self.name.startswith("private-") or self.name.startswith("presence-"):
                    self.connection.send_event(event_name, data, channel_name=self.name)
375569
def fire_event(self, evt_name, *args, **kwargs):
        
        listeners = self.__get_listeners(evt_name)
        evt = self.generate_event(evt_name)
        for listener in listeners:
            listener(evt, *args, **kwargs)
630690
def send_event(self, event_name, data, channel_name=None):
        
        event = {'event': event_name, 'data': data}
        if channel_name:
            event['channel'] = channel_name

        self.logger.info("Connection: Sending event - %s" % event)
        try:
            self.socket.send(json.dumps(event))
        except Exception as e:
            self.logger.error("Failed send event: %s" % e)
193107
def _trigger_event(self, event, *args, **kwargs):
        """"""
        run_async = kwargs.pop('run_async', False)
        if event in self.handlers:
            if run_async:
                return self.start_background_task(self.handlers[event], *args)
            else:
                try:
                    return self.handlers[event](*args)
                except:
                    self.logger.exception(event + ' handler error')
1016095
public void trigger(Object event){

        Set<Class> eventTypes = getAllInheritedClasses(event.getClass());

        for (Class eventType : eventTypes) {
            if(observers.containsKey(eventType)){
                for (EventObserver eventObserver : observers.get(eventType)) {
                    executionQueue.get().add(new EventExecution(event, eventObserver));
                }
            }
        }

        triggerQueue();
    }
125918
function(event, context, callback, selector) {
        var options = this.options;

        // Replace tokens
        if (event === '{mode}') {
            event = options.mode;
        }

        if (selector === '{selector}') {
            selector = this.nodes ? this.nodes.selector : '';
        }

        // Find and bind the function
        if ($.type(callback) === 'string') {
            callback = this[callback].bind(this);
        }

        this.__events.push([event, context, callback, selector]);
    }
411647
def _send_event_to_all(self, action, event):
        
        for project_listeners in self._listeners.values():
            for listener in project_listeners:
                listener.put_nowait((action, event, {}))