Cancels the upload.
358811
public function cancel()
    {
        $this->_buffer = null;

        $this->collection->getChunkCollection()->remove(['files_id' => $this->_documentId], ['limit' => 0]);
        $this->collection->remove(['_id' => $this->_documentId], ['limit' => 1]);

        $this->_isComplete = true;
    }
1247256
void destroy() {
        fileAccess.getAndUpdate(channel -> {
            if (channel != null) {
                try {
                    channel.close();
                } catch (IOException e) {
                    LOG.warn("Error closing file channel for disk file upload", e);
                }
            }
            return null;
        });
        data.release();
    }
470256
def abort(options = {})
      options = options.merge(
        account_id: @account_id,
        vault_name: @vault_name,
        upload_id: @id
      )
      resp = @client.abort_multipart_upload(options)
      resp.data
    end
207547
void cancel() {
        connection.removeConnectionListener(connListener);
        ((ObservableReader) reader).removeReaderListener(readerListener);
        ((ObservableWriter) writer).removeWriterListener(writerListener);
        messagesTable = null;
    }
74506
public synchronized void cancel() {
        // If the packet collector has already been cancelled, do nothing.
        if (cancelled) {
            return;
        }

        cancelled = true;
        connection.removeStanzaCollector(this);
        notifyAll();

        if (collectorToReset != null) {
            collectorToReset.cancel();
        }
    }
559089
def stop(self) -> None:
        """"""
        if self._stop and not self._posted_kork:
            self._stop()
            self._stop = None
1184853
public final void cancel () {
		cancelRunningChildren(0);
		Status previousStatus = status;
		status = Status.CANCELLED;
		if (tree.listeners != null && tree.listeners.size > 0) tree.notifyStatusUpdated(this, previousStatus);
		end();
	}
1112531
def cancel(self):
        
        if not self.__submitted:
            # XXX: Workaround for a bug reported on libusb 1.0.8: calling
            # libusb_cancel_transfer on a non-submitted transfer might
            # trigger a segfault.
            raise self.__USBErrorNotFound
        self.__mayRaiseUSBError(self.__libusb_cancel_transfer(self.__transfer))
209020
public function cancelAction() {
        BatchManager::instance()->setShouldCancel($this->batchIdentifier(), true);

        call_user_func([$this->batchProcessClassName(), 'cancelAll']);

        json_response(['status' => 'ok']);
    }
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);
        }
    }
841150
def cancel(self):
        """"""
        if self.OBSERVE_UPDATES:
            self.detach()
        self.ioloop.add_callback(self.cancel_timeouts)
262681
public void cancelCancellable() {

        if (timeoutMessageCancellable != null) {
            timeoutMessageCancellable.cancel();
        }
        if (getResponseFuture() != null && !getResponseFuture().isDone()) {
            getResponseFuture().cancel(true);
        }
    }
117300
def stop(self) -> None:
        """"""
        self._running = False
        if self._timeout is not None:
            self.io_loop.remove_timeout(self._timeout)
            self._timeout = None
230854
@Override
    public boolean stop() {
        synchronized(MetricCollectorSupport.class) {
            if (uploaderThread != null) {
                uploaderThread.cancel();
                uploaderThread.interrupt();
                uploaderThread = null;
                if (singleton == this) { // defensive check
                    singleton = null;
                }
                return true;
            }
        }
        return false;
    }
702714
public function cancel()
    {
        $data = $this->twisto->requestJson('POST', 'invoice/' . urlencode($this->invoice_id) . '/cancel/');
        $this->deserialize($data);
    }
157440
public void cancel() { //d583637, F73234
        synchronized (ivCancelLock) { //d601399
            ivIsCanceled = true;
            if (ivScheduledFuture != null)
                ivScheduledFuture.cancel(false);
            ivCache = null;
            ivElements = null;
        }
    }
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)
                )