Skip to content

Commit

Permalink
move processor shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiyueXu77 committed May 10, 2024
1 parent f3967c5 commit 20bb965
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/c_api/c_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include "xgboost/span.h" // for Span
#include "xgboost/string_view.h" // for StringView, operator<<
#include "xgboost/version_config.h" // for XGBOOST_VER_MAJOR, XGBOOST_VER_MINOR, XGBOOS...
#include "../processing/processor.h" // for Processor

#if defined(XGBOOST_USE_FEDERATED)
#include "../../plugin/federated/federated_server.h"
Expand Down Expand Up @@ -1738,8 +1737,6 @@ XGB_DLL int XGCommunicatorInit(char const* json_config) {
XGB_DLL int XGCommunicatorFinalize() {
API_BEGIN();
collective::Finalize();
processor_instance->Shutdown();
processor_instance = nullptr;
API_END();
}

Expand Down
4 changes: 4 additions & 0 deletions src/collective/communicator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ void Communicator::Init(Json const& config) {
void Communicator::Finalize() {
communicator_->Shutdown();
communicator_.reset(new NoOpCommunicator());
if (processor_instance != nullptr) {
processor_instance->Shutdown();
processor_instance = nullptr;
}
}
#endif
} // namespace xgboost::collective

0 comments on commit 20bb965

Please sign in to comment.