Browse Source

fix exit time too long issue

tags/v1.6.0
sabrinasun 4 years ago
parent
commit
8290c69d55
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      mindspore/ccsrc/debug/debugger/debugger.cc

+ 8
- 1
mindspore/ccsrc/debug/debugger/debugger.cc View File

@@ -616,7 +616,14 @@ void Debugger::SendHeartbeat(int32_t period) {
std::this_thread::sleep_for(std::chrono::milliseconds(retry_milliseconds));
}
} else {
std::this_thread::sleep_for(std::chrono::milliseconds(period * 1000));
int recheck_period_ms = 200;
for (int i = 0; i < (period * 1000 / recheck_period_ms); i++) {
if (enable_heartbeat_) {
std::this_thread::sleep_for(std::chrono::milliseconds(recheck_period_ms));
} else {
break;
}
}
}
}
}


Loading…
Cancel
Save