mirror of
https://github.com/SatDump/SatDump
synced 2026-08-13 17:47:30 -04:00
Don't crash if attempting to process 2 things at once
This commit is contained in:
parent
4f0a51a9cc
commit
608fd71061
1 changed files with 4 additions and 0 deletions
|
|
@ -13,6 +13,8 @@ namespace satdump
|
|||
extern std::shared_ptr<Application> current_app;
|
||||
extern bool in_app;
|
||||
|
||||
std::mutex processing_mutex;
|
||||
|
||||
namespace processing
|
||||
{
|
||||
void process(std::string downlink_pipeline,
|
||||
|
|
@ -21,6 +23,7 @@ namespace satdump
|
|||
std::string output_file,
|
||||
nlohmann::json parameters)
|
||||
{
|
||||
processing_mutex.lock();
|
||||
is_processing = true;
|
||||
|
||||
logger->info("Starting processing pipeline " + downlink_pipeline + "...");
|
||||
|
|
@ -62,6 +65,7 @@ namespace satdump
|
|||
viewer_app->loadDatasetInViewer(output_file + "/dataset.json");
|
||||
}
|
||||
}
|
||||
processing_mutex.unlock();
|
||||
}
|
||||
|
||||
std::shared_ptr<std::vector<std::shared_ptr<ProcessingModule>>> ui_call_list = std::make_shared<std::vector<std::shared_ptr<ProcessingModule>>>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue