MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / cancelCurrent

Method cancelCurrent

pj_app/src/FileLoader.cpp:1061–1072  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1059}
1060
1061void FileLoader::cancelCurrent(bool keep_partial) {
1062 if (ctx_ == nullptr) {
1063 return; // no worker load in progress (fanout cancellation flows through its modal dialog)
1064 }
1065 cancel_mode_.store(keep_partial ? 1 : 2);
1066 if (ctx_->ingest) {
1067 // Flag-only stop: cancelCurrent runs on the GUI thread while the worker may be in a
1068 // host callback, so writing a reason here would race the worker's last_error_. The
1069 // cooperative stop only needs the atomic flag; the reason is unused on this path.
1070 ctx_->ingest->requestStop();
1071 }
1072}
1073
1074bool FileLoader::isBusy() const {
1075 return active_load_ || !queue_.empty();

Callers 1

MainWindowMethod · 0.80

Calls 2

storeMethod · 0.80
requestStopMethod · 0.80

Tested by

no test coverage detected