///////////////////////////////////////
// API helper methods
///////////////////////////////////////
// CancelActiveOffers ...
10695
func (api *API) CancelActiveOffers() (err error) {
	offers, err := api.ActiveOffers()
	if err != nil {
		return
	}

	for _, o := range offers {
		err = api.CancelOffer(o.ID)

		if err != nil {
			return
		}
	}

	return
}
712989
function cancelBets() {
        // check request bets list
        var error;
        for ( var i = 0; i < req.request.bets.length; ++i) {
            var desc = req.request.bets[i];
            error = checkCancelBetItem(self, desc);
            // console.log('EMU bet', desc, "error", error);
            if (error)
                break;
        }
        if (error) {
            res.response.errorCode = 'MARKET_IDS_DONT_MATCH';
            cb(null, res);
            return;
        }

        // cancel bets
        res.response.errorCode = 'OK';
        res.response.betResults = [];
        for ( var i = 0; i < req.request.bets.length; ++i) {
            var betId = req.request.bets[i].betId;
            console.log('EMU: cancel id=', betId);
            var bet = self.bets[betId];

            // do cancel work
            var result = bet.cancel();

            var resItem = {
                betId : bet.betId,
                resultCode : result.code,
                sizeCancelled : result.sizeCancelled,
                sizeMatched : result.sizeMatched,
                success : result.success
            };

            res.response.betResults.push(resItem);
        }

        // cancelBets was OK
        cb(null, res);
    }
1230966
private void cancelLeaveTimer() {
    if (leaveTimeout != null) {
      LOGGER.trace("{} - Cancelling leave timeout", member().address());
      leaveTimeout.cancel();
      leaveTimeout = null;
    }
  }
171870
def cancel(self) :
        ""
        dbus.dbus_pending_call_cancel(self._dbobj)
        if self._awaiting != None :
            # This probably shouldn’t occur. Looking at the source of libdbus,
            # it doesn’t keep track of any “cancelled” state for the PendingCall,
            # it just detaches it from any notifications about an incoming reply.
            self._awaiting.cancel()
1177181
function cancel(opt_reason) {
    if (!isPending()) {
      return;
    }

    if (opt_canceller) {
      opt_reason = opt_canceller(opt_reason) || opt_reason;
    }

    reject(opt_reason);
  }
1336921
def cancel(id)
      have_key?
      address = @url_private + "/trade_cancel/"
      params = {
        "id" => id,
      }
      h = post_ssl_with_sign(address, params)
      {
        "success" => h["result"],
      }
    end
338672
@Override
    public int cancel2(long channelId, long callId) throws AsyncException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "cancel2: channel = " + channelId + " call id = " + callId);
        }
        int rc = 0;
        synchronized (oneAtATime) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "have lock");
            }
            if (aioInitialized == AIO_INITIALIZED) {
                try {
                    // Ask the native code to perform a cancel operation
                    rc = aio_cancel2(channelId, callId);
                } catch (Throwable t) {
                    if (aioInitialized != AIO_SHUTDOWN) {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "caught throwable:" + t);
                        }
                        throw new AsyncException("Throwable caught from aio dll: aio_cancel2: " + t.getMessage());
                    }
                }
            }
        } // end-sync
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "cancel2: " + rc);
        }
        return rc;
    }
1006249
public JsonResponse cancelSend(String sendId) throws IOException {
        Map<String, Object> data = new HashMap<String, Object>();
        data.put(Send.PARAM_SEND_ID, sendId);
        return apiDelete(ApiAction.send, data);
    }
1191122
async function stopAllActivePlayers(con) {
	const players = await con.Player.GetActivePlayers();

	await Promise.all(players.map(player => {
		con.Player.Stop(player.playerid);
	}));
}
779062
private boolean cancelActiveAction(final Long actionId) {
        if (actionId != null) {
            try {
                deploymentManagement.cancelAction(actionId);
                return true;
            } catch (final CancelActionNotAllowedException e) {
                LOG.info("Cancel action not allowed exception :{}", e);
                return false;
            }
        }
        return false;
    }
435148
function (canceller) {
        var self = this;
        this._canceller = canceller;
        this._timeout = null;
        this._timer = null;

        this.handled = false;

        this.waiting = [];
        this.result = undefined;
        this.isError = false;
        this.finished = false;

        //this.currentContextHandler = contextHandler.getHandler && contextHandler.getHandler();
        this.__defineGetter__('promise', this.getPromise);
    }
383387
async def DestroyOffers(self, force, offer_urls):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='ApplicationOffers',
                   request='DestroyOffers',
                   version=2,
                   params=_params)
        _params['force'] = force
        _params['offer-urls'] = offer_urls
        reply = await self.rpc(msg)
        return reply
434544
public ApiSuccessResponse cancelForward(CancelForwardBody cancelForwardBody) throws ApiException {
        ApiResponse<ApiSuccessResponse> resp = cancelForwardWithHttpInfo(cancelForwardBody);
        return resp.getData();
    }
1250927
function onDeactivateEvent() {
         // cancel all event subscriptions
         me.event.unsubscribe(this.vpChangeHdlr);
         me.event.unsubscribe(this.vpResizeHdlr);
         me.event.unsubscribe(this.vpLoadedHdlr);
       }
1141269
async function cancel(input, reason) {
  if (isStream(input) && input.cancel) {
    return input.cancel(reason);
  }
}
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;
  }
58108
public void unsetAsynchConsumerCallback(int requestNumber, boolean stoppable)                        //SIB0115d.comms
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "unsetAsynchConsumerCallback", "requestNumber="+requestNumber+",stoppable="+stoppable);

      checkNotBrowserSession();                                   // F171893

      if (subConsumer != null)
      {
         subConsumer.unsetAsynchConsumerCallback(requestNumber, stoppable);                             //SIB0115d.comms
      }

      subConsumer = null;

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "unsetAsynchConsumerCallback");
   }