You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/04/02 20:51:21 UTC

[GitHub] [incubator-mxnet] anirudh2290 commented on a change in pull request #14397: Add exception handling support for waitall

anirudh2290 commented on a change in pull request #14397: Add exception handling support for waitall
URL: https://github.com/apache/incubator-mxnet/pull/14397#discussion_r271490567
 
 

 ##########
 File path: src/engine/threaded_engine.cc
 ##########
 @@ -415,6 +415,23 @@ void ThreadedEngine::WaitForAll() {
   finished_cv_.wait(lock, [this]() {
       return pending_.load() == 0 || kill_.load();
     });
+  std::exception_ptr exception_to_rethrow = nullptr;
+  if (!global_exception_refs_.empty()) {
+    // iterate through all exception refs
+    for (const auto& global_exception_ref : global_exception_refs_) {
+      // the first exception will be saved to be rethrown later
 
 Review comment:
   @access2rohit the order of the exceptions will be maintained exception thrown first will be rethrown first. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services