Set a change request as cancelled.
178787
def action_cancel(self):
        """"""
        self.write({'state': 'cancelled'})
        for rec in self:
            rec.message_post(
                subtype='mt_comment',
                body=_(
                    'Change request <b>%s</b> has been cancelled by %s.'
                    ) % (rec.display_name, self.env.user.name)
                )
614519
def __request_except(self, requestId, exc, set_and_forget=True):
        """"""
        try:
            with self.__requests:
                if set_and_forget:
                    req = self.__requests.pop(requestId)
                else:
                    req = self.__requests[requestId]
        except KeyError:
            logger.error('Unknown request %s - cannot set exception', requestId)
        else:
            if exc is not None:
                req.exception = exc
            if set_and_forget:
                req._set()
776945
private boolean cancelRequestInternal(
    AORequestedTick requestedTick,
    boolean expiry)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "cancelRequestInternal",
        new Object[] { requestedTick, Boolean.valueOf(expiry)});

    // cancel the timer only if !expiry, since expiry implies timer has already occured.
    boolean transitionOccured = requestedTick.expire(!expiry);
    if (transitionOccured)
    { // successfully expired
      listOfRequests.remove(requestedTick);
      tableOfRequests.remove(requestedTick.objTick);

      // start the idle timer if no element left in listOfRequests
      // and set isready to false
      if (listOfRequests.isEmpty())
      {
        if (idleTimeout > 0)
          this.idleHandler = am.create(idleTimeout, this);
        if (isready)
        {
          isready = false;
          ck.notReady();
        }
      }
    } // end if (transitionOccured)

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "cancelRequestInternal", Boolean.valueOf(transitionOccured));

    return transitionOccured;
  }
1063889
def cancelPendingResultsFor( self, params ):
        """"""
        
        # grab the result job ids
        jobs = self.pendingResultsFor(params)
        
        if len(jobs) > 0:
            # abort in the cluster
            self._abortJobs(jobs)
            
            # cancel in the notebook                  
            self.notebook().cancelPendingResultsFor(params)
786436
def askretrycancel(title=None, message=None, **options):
    """"""
    return psidialogs.ask_ok_cancel(title=title, message=message, ok='Retry')
177210
def cancel(self, method):
        """"""
        if method in self._scheduledMethods:
            self._scheduledMethods.remove(method)

        if not self._scheduledMethods:
            self._timer.stop()
157577
def cancel(self):
        

        method, url = get_URL('cancel')

        payload = {
            'apikey': self.config.get('apikey'),
            'transferid': self.transfer_id,
            'transferkey': self.transfer_info.get('transferkey')
            }

        res = getattr(self.session, method)(url, params=payload)

        if res.status_code == 200:
            self._complete = True
            return True

        hellraiser(res)
1251581
def cancel(self):
        """"""
        if self.channel_open:
            try:
                self.backend.cancel(self.consumer_tag)
            except KeyError:
                pass
761782
def cancel(self, tid, session):
        ''''''
        request = TOPRequest('taobao.logistics.online.cancel')
        request['tid'] = tid
        self.create(self.execute(request, session), fields = ['is_success','modify_time','recreated_order_id'], models = {'modify_time':TOPDate})
        return self
788758
def cancelled(self):
        """"""
        self._refresh_and_update()
        return (
            self._operation.HasField("error")
            and self._operation.error.code == code_pb2.CANCELLED
        )
622466
def DeleteRequest(self, request):
    """"""
    self.requests_to_delete.append(request)

    if request and request.HasField("request"):
      self.DeQueueClientRequest(request.request)

    data_store.DB.DeleteRequest(request)
180228
public void cancelPendingTake() {
        CompletableFuture<Queue<T>> pending;
        synchronized (this.contents) {
            pending = this.pendingTake;
            this.pendingTake = null;
        }

        // Cancel any pending poll request.
        if (pending != null) {
            pending.cancel(true);
        }
    }
654201
def cancel(self):
        
        done = self.finished.is_set()
        self.finished.set()
        return not done
918294
def _cancel(self, msgId):
        
        _, canceller = self._requests.pop(msgId, (None, None))

        if canceller is not None and canceller.active():
            canceller.cancel()
72724
void cancelEdit() {

        m_handler.enableToolbarButtons();
        m_handler.activateSelection();
        m_handler.m_controller.setContentEditing(false);
        m_handler.m_controller.reInitInlineEditing();
        m_replaceElement = null;
        m_dependingElementId = null;
        m_currentElementId = null;
        m_editorOpened = false;
    }
404308
def switch_off(self):
        """"""
        success = self.set_status(CONST.STATUS_CLOSED_INT)

        if success:
            self._json_state['status'] = CONST.STATUS_CLOSED

        return success
1092863
private void cancelPendingSlotRequest(PendingSlotRequest pendingSlotRequest) {
		CompletableFuture<Acknowledge> request = pendingSlotRequest.getRequestFuture();

		returnPendingTaskManagerSlotIfAssigned(pendingSlotRequest);

		if (null != request) {
			request.cancel(false);
		}
	}