Skip to content

Commit

Permalink
assume shutdown will not be called from exe, add option later on
Browse files Browse the repository at this point in the history
  • Loading branch information
galabovaa committed Sep 19, 2024
1 parent 4eaaa01 commit 3b78330
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/RunHighs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ int main(int argc, char** argv) {
if (write_model_status == HighsStatus::kError)
return (int)write_model_status; // todo: change to write model error
}
HighsTaskExecutor::shutdown(true);
// HighsTaskExecutor::shutdown(true);

return (int)run_status;
}
Expand Down
5 changes: 4 additions & 1 deletion src/parallel/HighsTaskExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ class HighsTaskExecutor {
}
else {
for (auto& workerThread : workerThreads) {
// workerThread.detach();
// do not detach if shutdown() will be called from executable
// after we are done with the highs library
//workerThread.detach();
workerThread.detach();
}
}
}
Expand Down

0 comments on commit 3b78330

Please sign in to comment.