This should never be called directly, it is called via an
           event, and should always be on the GUI thread
499939
def __process_idle_events(self):
        """"""
        while True:
            try:
                callable, args = self.queue.get(block=False)
            except queue.Empty:
                break
            callable(*args)
822958
private void fireEvent(ManagerEvent event)
    {
        synchronized (eventListeners)
        {
            for (ManagerEventListener listener : eventListeners)
            {
                try
                {
                    listener.onManagerEvent(event);
                }
                catch (RuntimeException e)
                {
                    logger.warn("Unexpected exception in eventHandler " + listener.getClass().getName(), e);
                }
            }
        }
    }
718682
public void dispatchEvent(Event event, String eventName) {
    int typeInt = Event.getTypeInt(eventName);
    Object[] handlerData = $(element).data(EVENT_DATA);
    for (int i = 0, l = elementEvents.length(); i < l; i++) {
      BindFunction listener = elementEvents.get(i);
      String namespace = JsUtils.prop(event, "namespace");
      boolean matchEV = listener != null && (listener.hasEventType(typeInt) || listener.isTypeOf(eventName));
      boolean matchNS = matchEV && (isNullOrEmpty(namespace) || listener.nameSpace.equals(namespace));
      if (matchEV && matchNS) {
        if (!listener.fire(event, typeInt, eventName, handlerData)) {
          event.stopPropagation();
          event.preventDefault();
        }
      }
    }
  }
675256
def stop_gui_thread():
    
    PyGUIThread = getattr(ROOT, 'PyGUIThread', None)

    if PyGUIThread is None or not PyGUIThread.isAlive():
        log.debug("no existing GUI thread is runnng")
        return False

    ROOT.keeppolling = 0
    try:
        PyGUIThread.finishSchedule()
    except AttributeError:
        log.debug("unable to call finishSchedule() on PyGUIThread")
        pass
    PyGUIThread.join()
    log.debug("successfully stopped the existing GUI thread")
    return True
1295440
private void startHandleModifyThread(final WatchEvent<?> event, final Path currentPath) {
		ThreadUtil.execute(new Runnable(){
			@Override
			public void run() {
				ThreadUtil.sleep(delay);
				eventSet.remove(Paths.get(currentPath.toString(), event.context().toString()));
				watcher.onModify(event, currentPath);
			}
		});
	}
1004994
function Event() {
    SelectableItem.call(this, this /* modelItem */);
    this.guid_ = tr.b.GUID.allocate();
    this.selectionState = SelectionState.NONE;
    this.associatedAlerts = new tr.model.EventSet();
    this.info = undefined;
  }
120319
public void dispatch_event(final EventData eventData) {
        final TangoChange tangoChange = this;
        if (EventUtil.graphicAvailable()) {
            //   Causes doRun.run() to be executed asynchronously
            //      on the AWT event dispatching thread.
            Runnable do_work_later = new Runnable() {
                public void run() {
                    fireTangoChangeEvent(tangoChange, eventData);
                }
            };
            SwingUtilities.invokeLater(do_work_later);
        }
        else {
            fireTangoChangeEvent(tangoChange, eventData);
        }
    }
1068638
@Override
  public boolean onTrigger() {
    List<Event<T>> windowEvents = null;
    List<T> expired = null;

    /*
     * scan the entire window to handle out of order events in
     * the case of time based windows.
     */
    windowEvents = scanEvents(true);
    expired = new ArrayList<>(expiredEvents);
    expiredEvents.clear();
    List<T> events = new ArrayList<>();
    List<T> newEvents = new ArrayList<>();
    for (Event<T> event : windowEvents) {
      events.add(event.get());
      if (!prevWindowEvents.contains(event)) {
        newEvents.add(event.get());
      }
    }
    prevWindowEvents.clear();
    if (!events.isEmpty()) {
      prevWindowEvents.addAll(windowEvents);
      LOG.fine(String.format("invoking windowLifecycleListener onActivation, [%d] events in "
          + "window.", events.size()));
      windowLifecycleListener.onActivation(events, newEvents, expired,
          evictionPolicy.getContext().getReferenceTime());
    } else {
      LOG.fine("No events in the window, skipping onActivation");
    }
    triggerPolicy.reset();
    return !events.isEmpty();
  }
181934
@Override
    public void enterInterrupt(Dim.StackFrame lastFrame,
                               String threadTitle,
                               String alertMessage) {
        if (SwingUtilities.isEventDispatchThread()) {
            enterInterruptImpl(lastFrame, threadTitle, alertMessage);
        } else {
            RunProxy proxy = new RunProxy(this, RunProxy.ENTER_INTERRUPT);
            proxy.lastFrame = lastFrame;
            proxy.threadTitle = threadTitle;
            proxy.alertMessage = alertMessage;
            SwingUtilities.invokeLater(proxy);
        }
    }
295609
void lockForHandlingWork() {
        synchronized(m_lock) {
            assert m_running == false;
            m_running = true;
            m_readyOps = 0;
            m_readyOps = m_selectionKey.readyOps();      // runnable.run() doesn't accept parameters
        }
    }
1130223
public void dispatch_event(final EventData eventData) {
        final TangoInterfaceChange interfaceChange = this;
        if (EventUtil.graphicAvailable()) {
            //   Causes doRun.run() to be executed asynchronously
            //      on the AWT event dispatching thread.
            Runnable do_work_later = new Runnable() {
                public void run() {
                    fireTangoInterfaceChangeEvent(interfaceChange, eventData);
                }
            };
            SwingUtilities.invokeLater(do_work_later);
        }
        else {
            fireTangoInterfaceChangeEvent(interfaceChange, eventData);
        }
    }
1360710
def leaveEvent( self, event ):
        
        hitem = self.hoveredItem()
        hcol  = self.hoveredColumn()
        
        if ( hitem != None ):
            self._hoveredItem   = None
            self._hoveredColumn = -1
            
            rect = self.visualItemRect(hitem)
            rect.setWidth(self.viewport().width())
            self.viewport().update(rect)
        
        super(XTreeWidget, self).leaveEvent(event)
735834
@Override
	public void onViewCreated(View view, Bundle savedInstanceState) {
	
		super.onViewCreated(view, savedInstanceState);
		EventUtils.link(EVENT_CONFIGURATION);
	}
1090953
public final void event(Class sourceClass,
                            String methodName,
                            Throwable throwable) {
        internalEvent(null,
                      sourceClass,
                      methodName,
                      throwable);
    }
47789
function (event) {
            var
                eventsHandler;
            if (event
                && event.type() === _gpfI.IWritableStream.EVENT_ERROR) {
                gpfFireEvent.call(this, event, this._eventsHandler);
            } else if (0 === this._buffer.length) {
                eventsHandler = this._eventsHandler;
                this._eventsHandler = null;
                gpfFireEvent.call(this, _gpfI.IWritableStream.EVENT_READY, eventsHandler);
            } else {
                this._stream.write(this._buffer.shift(), this._flushed.bind(this));
            }
        }
1092581
public void eventUnreferenced(ActivityHandle arg0, FireableEventType fireableEventType,
            Object event, Address address, ReceivableService receivableService, int integer) {
        // release event thread
        releaseHttpRequest((HttpServletRequestEvent) event);
    }
874194
def delete_event(self, widget, event, data=None):
        
        if not self.close_win:
            if self.thread.isAlive():
                dlg = self.gui_helper.create_message_dialog("Do you want to cancel project creation?",
                                                            buttons=Gtk.ButtonsType.YES_NO)
                response = dlg.run()
                if response == Gtk.ResponseType.YES:
                    if self.thread.isAlive():
                        self.info_label.set_label('<span color="#FFA500">Cancelling...</span>')
                        self.dev_assistant_runner.stop()
                        self.project_canceled = True
                    else:
                        self.info_label.set_label('<span color="#008000">Done</span>')
                    self.allow_close_window()
                dlg.destroy()
                return True
        else:
            return False