From 91d535a0e6c9dd881ccf663206e9fcf064b77a2f Mon Sep 17 00:00:00 2001 From: Przemyslaw Tredak Date: Thu, 23 Jul 2020 14:10:08 -0700 Subject: [PATCH] Fix crash when accessing already destructed static variables (#18768) (#18778) --- src/c_api/c_api.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/c_api/c_api.cc b/src/c_api/c_api.cc index b9511aef15f7..fdc794231465 100644 --- a/src/c_api/c_api.cc +++ b/src/c_api/c_api.cc @@ -1315,6 +1315,7 @@ int MXNotifyShutdown() { API_BEGIN(); mxnet::op::custom::CustomOperator::Get()->Stop(); Engine::Get()->NotifyShutdown(); + Engine::Get()->WaitForAll(); API_END(); }