From f8255ddac62c89712678faf85fc09cfd6ba00ba3 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Fri, 23 May 2014 16:46:53 -0700 Subject: [PATCH] fix(library/module): deadlock Signed-off-by: Leonardo de Moura --- src/library/module.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/library/module.cpp b/src/library/module.cpp index 578b33a80c..da06892fa7 100644 --- a/src/library/module.cpp +++ b/src/library/module.cpp @@ -303,6 +303,7 @@ struct import_modules_fn { while (auto t = next_task()) { (*t)(m_senv); } + m_asynch_cv.notify_all(); } catch (exception ex) { thread_exceptions[i].reset(ex.clone()); } catch (...) { @@ -314,6 +315,7 @@ struct import_modules_fn { while (auto t = next_task()) { (*t)(m_senv); } + m_asynch_cv.notify_all(); for (auto & th : extra_threads) th->join(); } catch (...) {