Resolves an event. (delayed action)
10091
def post_event(self, client, check):
        
        self._request('POST', '/resolve',
                      data=json.dumps({'client': client, 'check': check}))
        return True
836966
function _gpfEventsTriggerHandler (event, eventsHandler, resolvePromise) {
    var eventHandler = _getEventHandler(event, eventsHandler);
    eventHandler(event);
    if (undefined !== resolvePromise) {
        resolvePromise(event);
    }
}
790447
def _handle_event(self, connection, event):
        
        with self.mutex:
            matching_handlers = sorted(
                self.handlers.get("all_events", [])
                + self.handlers.get(event.type, [])
            )
            for handler in matching_handlers:
                result = handler.callback(connection, event)
                if result == "NO MORE":
                    return
648696
@Override
	public void onModify(WatchEvent<?> event, Path currentPath) {
		if(this.delay < 1) {
			this.watcher.onModify(event, currentPath);
		}else {
			onDelayModify(event, currentPath);
		}
	}
305677
function later( delay ) {
    if ( typeof delay === 'undefined' ) delay = 1;
    return new Promise(
        function( resolve, reject ) {
            window.setTimeout( resolve, delay );
        }
    );
}
210704
function ( delay, callback, data ) {
            data = ( data || data == 0 )? data : null;
            this._count++;
            var count = this._count;
            var _this = this;
    
            this._delays[count] = setTimeout(function () {
                callback.call( _this, {data: data});
                _this.clear(count);
            }, delay);
            return count;
        }
1262806
async def handler(event):
    """"""
    rtd = RTFD if event.pattern_match.group(1) else RTD
    await asyncio.wait([
        event.delete(),
        event.respond(rtd, reply_to=event.reply_to_msg_id)
    ])
1301736
function instantDeferred(resolve, returnValue, context) {
	var deferred = $.Deferred();
	if (resolve) {
		deferred.resolveWith(context, [returnValue]);
	} else {
		deferred.rejectWith(context, [returnValue]);
	}

	return deferred;
}
1247526
private static void fireMissingEvent() {
        if (delayCheckSignaled) {
            // already going...
            return;
        }
        ScheduledEventService scheduler = CHFWBundle.getScheduleService();
        if (null != scheduler) {
            delayCheckSignaled = true;
            ChannelFrameworkImpl cf = (ChannelFrameworkImpl) ChannelFrameworkFactory.getChannelFramework();
            scheduler.schedule(CHFWEventHandler.EVENT_CHECK_MISSING,
                               cf.getMissingConfigDelay(), TimeUnit.MILLISECONDS);
        }
    }
778159
function debounce(f, delay) {
  var timeoutId = null;

  return function debounceExecute_() {
    clearTimeout(timeoutId);
    var lastArgs = arguments;

    timeoutId = setTimeout(function() {
      timeoutId = null;
      f.apply(null, lastArgs);
    }, delay);
  };
}
158815
function ( action ) {
			var clear = function () {
					clearTimeout(F.player.timer);
				},
				set = function () {
					clear();

					if (F.current && F.player.isActive) {
						F.player.timer = setTimeout(F.next, F.current.playSpeed);
					}
				},
				stop = function () {
					clear();

					D.unbind('.player');

					F.player.isActive = false;

					F.trigger('onPlayEnd');
				},
				start = function () {
					if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) {
						F.player.isActive = true;

						D.bind({
							'onCancel.player beforeClose.player' : stop,
							'onUpdate.player'   : set,
							'beforeLoad.player' : clear
						});

						set();

						F.trigger('onPlayStart');
					}
				};

			if (action === true || (!F.player.isActive && action !== false)) {
				start();
			} else {
				stop();
			}
		}
912578
function resolve() {
    var me = this,
        clone = me.benchmark,
        bench = clone._original;

    if (bench.aborted) {
      // cycle() -> clone cycle/complete event -> compute()'s invoked bench.run() cycle/complete
      me.teardown();
      clone.running = false;
      cycle(me);
    }
    else if (++me.cycles < clone.count) {
      // continue the test loop
      if (support.timeout) {
        // use setTimeout to avoid a call stack overflow if called recursively
        setTimeout(function() { clone.compiled.call(me, timer); }, 0);
      } else {
        clone.compiled.call(me, timer);
      }
    }
    else {
      timer.stop(me);
      me.teardown();
      delay(clone, function() { cycle(me); });
    }
  }
659608
protected function dispatch(DelayedEvent $event)
    {
        if ($this->current instanceof Transaction) {
            // Already in transaction, reserve it
            $this->current->attach($event);
        } else {
            // There are no transactions, just dispatch it
            $event->fire();
        }
    }
48996
def _handle(self, event_handler, event_name, user_args, event_timeout,
                cond, cond_timeout):
        
        if cond:
            cond.wait(cond_timeout)
        event = self.pop_event(event_name, event_timeout)
        return event_handler(event, *user_args)
766791
@Override
    public void onEvent(EventIterator events) {
        try {
            // this resolver should be the only one (for this handling thread)
            ResourceResolver resolver = getResolver();
            if (resolver != null) {
                try {
                    Session session = resolver.adaptTo(Session.class);
                    String serviceUserId = getServiceUserId();
                    // collect changed nodes
                    ChangeCollection changedNodes = new ChangeCollection();
                    while (events.hasNext()) {
                        Event event = events.nextEvent();
                        if (ignoreEvent(event)) continue;
                        try {
                            String path = event.getPath();
                            String user = event.getUserID();
                            // if the service user is the initiator this is a self initiated event - ignore it
                            if (!serviceUserId.equals(user)) {
                                Calendar time = Calendar.getInstance();
                                time.setTime(new Date(event.getDate()));
                                int type = event.getType();
                                if (isPropertyEvent(type)) {
                                    if (getPropertyPathFilter().accept(path)) {
                                        changedNodes.registerChange(session, resolver, path, time, user);
                                    }
                                } else {
                                    if (getNodePathFilter().accept(path)) {
                                        changedNodes.registerChange(session, resolver, path, time, user);
                                    }
                                }
                            }
                        } catch (RepositoryException rex) {
                            LOG.error(rex.getMessage(), rex);
                        }
                    }
                    // handle change actions on the detected nodes
                    if (changedNodes.size() > 0) {
                        for (ChangedResource change : changedNodes.values()) {
                            try {
                                doOnChange(resolver, change);
                            } catch (RepositoryException ex) {
                                LOG.error(ex.getMessage(), ex);
                            }
                        }
                        changedNodes.clear();
                        resolver.commit();
                    }
                } catch (PersistenceException ex) {
                    LOG.error(ex.getMessage(), ex);
                } finally {
                    resolver.close();
                }
            }
        } catch (LoginException ex) {
            LOG.error(ex.getMessage(), ex);
        }
    }
199103
def wait_event(self, filter: Callable[[T_Event], bool] = None) -> Awaitable[T_Event]:
        """"""
        return wait_event([self], filter)
633544
def wait(self, timeout):
        ''''''
        logger.debug('Waiting for %fs', timeout)
        return self._event.wait(timeout)