piiswrong commented on a change in pull request #9681: Better Exception
Handling for Operators
URL: https://github.com/apache/incubator-mxnet/pull/9681#discussion_r165725747
##########
File path: src/engine/threaded_engine.cc
##########
@@ -356,7 +357,11 @@ void ThreadedEngine::DeleteVariable(SyncFn delete_fn,
void ThreadedEngine::WaitForVar(VarHandle var) {
BulkFlush();
ThreadedVar* threaded_var = ThreadedVar::CastFromBase(var);
- if (threaded_var->ready_to_read()) return;
+ if (threaded_var->ready_to_read()) {
+ if (threaded_var->ex_ptr) {
+ std::rethrow_exception(threaded_var->ex_ptr);
+ }
+ }
Review comment:
why are you not returning?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services