Browse Source

fix(imperative/interpreter): reset m_waitee on exception

GitOrigin-RevId: ecf5245d9c
tags/v1.3.0
Megvii Engine Team 4 years ago
parent
commit
8ed2077bcb
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      imperative/src/impl/interpreter_impl.cpp

+ 2
- 0
imperative/src/impl/interpreter_impl.cpp View File

@@ -483,6 +483,8 @@ void ChannelImpl::process_one_task(Command& cmd) {

void ChannelImpl::check_worker_exc_unsafe() {
if (m_worker_exc) {
// for reuse interpreter_for_py after some exception tests
m_waitee = nullptr;
std::exception_ptr exc;
std::swap(exc, m_worker_exc);
std::rethrow_exception(exc);


Loading…
Cancel
Save