Enter a new event in the queue at an absolute time.

        Returns an ID for the event which can be used to remove it,
        if necessary.
507072
def enterabs(self, time, priority, action, argument=(), kwargs=_sentinel):
        
        if kwargs is _sentinel:
            kwargs = {}
        event = Event(time, priority, action, argument, kwargs)
        with self._lock:
            heapq.heappush(self._queue, event)
        return event
632869
def _sync_enter(self):
    
    if hasattr(self, 'loop'):
        loop = self.loop
    else:
        loop = self._client.loop

    if loop.is_running():
        raise RuntimeError(
            'You must use "async with" if the event loop '
            'is running (i.e. you are inside an "async def")'
        )

    return loop.run_until_complete(self.__aenter__())
897539
def enterEvent(self, event):
        

        if self.__checkable:
            not self.__checked and self.setPixmap(self.__hover_pixmap)
        else:
            self.setPixmap(self.__hover_pixmap)
651520
def _trigger_event(self, event):
    

    if event is None or event not in self.__listeners:
      raise ValueError('invalid event type: {0!r}'.format(event))

    # Check the event has not already been triggered, then mark
    # the event as triggered.
    if event in self.__event_set:
      raise RuntimeError('event already triggered: {0!r}'.format(event))
    self.__event_set.add(event)
    listeners = self.__listeners[event] + self.__listeners[None]

    # Remove one-off listeners.
    self.__listeners[event][:] = (l for l in self.__listeners[event] if not l.once)
    self.__listeners[None][:] = (l for l in self.__listeners[None] if not l.once)

    for listener in listeners:
      # XXX: What to do on exceptions? Catch and make sure all listeners
      # run through? What to do with the exception(s) then?
      listener.callback(self, event)
1250345
void handleJoinEvent(JoinEvent event)
    {
        final AsteriskQueueImpl queue = getInternalQueueByName(event.getQueue());
        final AsteriskChannelImpl channel = channelManager.getChannelImplByName(event.getChannel());

        if (queue == null)
        {
            logger.error("Ignored JoinEvent for unknown queue " + event.getQueue());
            return;
        }
        if (channel == null)
        {
            logger.error("Ignored JoinEvent for unknown channel " + event.getChannel());
            return;
        }

        if (queue.getEntry(event.getChannel()) != null)
        {
            logger.error("Ignored duplicate queue entry in queue " + event.getQueue() + " for channel " + event.getChannel());
            return;
        }

        // Asterisk gives us an initial position but doesn't tell us when he
        // shifts the others
        // We won't use this data for ordering until there is a appropriate
        // event in AMI.
        // (and refreshing the whole queue is too intensive and suffers
        // incoherencies
        // due to asynchronous shift that leaves holes if requested too fast)
        int reportedPosition = event.getPosition();

        queue.createNewEntry(channel, reportedPosition, event.getDateReceived());
    }
727929
def PushEvent(self, event):
    
    macb_group_identifier, content_identifier = self._GetEventIdentifiers(event)

    # We can ignore the timestamp here because the psort engine only stores
    # events with the same timestamp in the event heap.
    heap_values = (macb_group_identifier or '', content_identifier, event)
    heapq.heappush(self._heap, heap_values)
269709
def put(self, event, *args, **kwargs):
        
        self._queue.put((event, args, kwargs))
1085038
def press_event(self):
        
        if self.mouse_event.press_event is None:
            return None
        ev = self.copy()
        ev.mouse_event = self.mouse_event.press_event
        return ev
1061526
def PushEvent(self, event):
    
    event_string = event.GetAttributeValuesString()
    heap_values = (event.timestamp, event.timestamp_desc, event_string, event)
    heapq.heappush(self._heap, heap_values)
1121263
def get_event(self):
        ''''''
        if self.event_queue.qsize() == 0:
            return None
        evt = self.event_queue.get()
        while isinstance(evt, win_layout.WinLayout):
            win_layout.set_layout(evt, self.set_layout)
            if self.event_queue.qsize() == 0:
                return None
            evt = self.event_queue.get()
        return evt
873558
def new_event(self, subject=None):
        
        return self.event_constructor(parent=self, subject=subject,
                                      calendar_id=self.calendar_id)
29507
def register_event(id, info = EMPTY_HASH)
      Notifications.events[id] = Event.new(id, info)
    end
1019006
def PopEvent(self):
    
    try:
      timestamp, serialized_event = heapq.heappop(self._heap)

      self.data_size -= len(serialized_event)
      return timestamp, serialized_event

    except IndexError:
      return None, None
714797
def PopEvent(self):
    
    try:
      macb_group_identifier, content_identifier, event = heapq.heappop(
          self._heap)
      if macb_group_identifier == '':
        macb_group_identifier = None
      return macb_group_identifier, content_identifier, event

    except IndexError:
      return None
1198791
def keyPressEvent(self, event):
        

        processEvent = True
        for accelerator in self.__pre_input_accelerators:
            processEvent *= accelerator(self, event)

        if not processEvent:
            return

        Basic_QPlainTextEdit.keyPressEvent(self, event)

        for accelerator in self.__post_input_accelerators:
            accelerator(self, event)
577749
def new_for_event(event, controller_class, method)
      controller_class = reload!(controller_class)
      controller = controller_class.new

      prepare(controller, event, method)

      controller
    end
1353460
def GetNewEventId(self, event_time=None):
    """"""
    if event_time is None:
      event_time = int(time.time() * 1e6)

    return "%s:%s:%s" % (event_time, socket.gethostname(), os.getpid())