Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[Core] Add shutdown logic to clear executor manager resources (#34477)

liangc2fddcf05394
diff --git a/src/inference/src/cpp/core.cpp b/src/inference/src/cpp/core.cpp
index 924be566d40..fd8359fee7c 100644
--- a/src/inference/src/cpp/core.cpp
+++ b/src/inference/src/cpp/core.cpp
@@ -10,6 +10,7 @@
#include "openvino/frontend/manager.hpp"
#include "openvino/runtime/device_id_parser.hpp"
#include "openvino/runtime/iremote_context.hpp"
+#include "openvino/runtime/threading/executor_manager.hpp"
#include "openvino/util/file_util.hpp"
namespace ov {
@@ -325,6 +326,7 @@ RemoteContext Core::get_default_context(const std::string& device_name) {
void shutdown() {
frontend::FrontEndManager::shutdown();
+ ov::threading::executor_manager()->clear();
}
} // namespace ov