Cancels a previously scheduled event. This method is private, and is meant for internal usage by the
        :py:class:`Simulator` and :py:class:`Process` classes, and helper functions of this module.
434003
def _cancel(self, id_cancel) -> None:
        
        if _logger is not None:
            self._log(DEBUG, "cancel", id=id_cancel)
        for event in self._events:
            if event.identifier == id_cancel:
                event.cancel()
                break
443138
def pop_event(self):
        """"""
        if len(self.event_list) > 0:
            evt = self.event_list.pop(0)
            return evt
        return None
575322
def off(self, event, handler=None):
        """"""
        if handler:
            self.events[event].off(handler)
        else:
            del self.events[event]
            delattr(self, event)
1359633
public function cancel_process() {
        // Delete temporary restore course if exists.
        if ($this->controller->get_target() == backup::TARGET_NEW_COURSE) {
            $this->cleanup();
        }
        parent::cancel_process();
    }
1160926
def remove_observer(self, signal, observer):
        

        self._is_allowed_event(signal)
        self._remove_observer(signal, observer)
1322241
def off(self, event):
        ''
        try:
            self._once_events.remove(event)
        except KeyError:
            pass
        self._callback_by_event.pop(event, None)
135644
def cancel():
    
    cancel = threading.Event()

    def cancel_execution(signum, frame):
        signame = SIGNAL_NAMES.get(signum, signum)
        logger.info("Signal %s received, quitting "
                    "(this can take some time)...", signame)
        cancel.set()

    signal.signal(signal.SIGINT, cancel_execution)
    signal.signal(signal.SIGTERM, cancel_execution)
    return cancel
794790
def cancel(self, force=False):
        
        return self.rest_client._sc._delegator._cancel_job(self, force)
932836
public void cancel(ScheduledFuture<?> scheduledFuture) {
        clear();
        if (scheduledFuture != null && !scheduledFuture.isDone()) {
            scheduledFuture.cancel(false);
        }
    }
320166
def remove_event(self, ref):
        
        # is this reference one which has been setup?
        if ref in self._refs:
            self._refs[ref].remove_callback(ref)
1201298
private Cancellable scheduleCron(int initialDelay, int interval, MessageTypes message) {
        return scheduler.schedule(secs(initialDelay), secs(interval),
                            getSelf(), message, getContext().dispatcher(), null);
    }
52018
def cancel(self):
        
        with self._condition:
            if self._state in [RUNNING, FINISHED]:
                return False

            if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
                return True

            self._state = CANCELLED
            self._condition.notify_all()

        self._invoke_callbacks()
        return True
555267
public void unscheduleTask() {
    if (unschedule.compareAndSet(false, true)) {
      scheduledFuture.cancel(false);
      scheduledFuture = null;
    }

  }
730740
def remove_all_listeners(self, event=None):
        
        if event is not None:
            self._registered_events[event] = OrderedDict()
        else:
            self._registered_events = defaultdict(OrderedDict)
529374
def cancel(self, function):
        """"""
        if function in self._callback.keys():
            callback_id = self._callback[function][0]
            self.tk.after_cancel(callback_id)
            self._callback.pop(function)
        else:
            utils.error_format("Could not cancel function - it doesnt exist, it may have already run")
129256
def delete_external_event(self, calendar_id, event_uid):
        
        self.request_handler.delete(endpoint='calendars/%s/events' % calendar_id, data={'event_uid': event_uid})
824219
def cancel(self):
        '''
        
        '''
        if (not self.cancelled) and (self._fn is not None):
            self._cancelled = True
            self._drop_fn()