diff --git a/src/library/module.cpp b/src/library/module.cpp index 1abfb91ae..6505a9e24 100644 --- a/src/library/module.cpp +++ b/src/library/module.cpp @@ -261,8 +261,10 @@ struct import_modules_fn { obj_counter++; } } - if (atomic_fetch_sub_explicit(&m_import_counter, 1u, memory_order_relaxed) == 1u) + if (atomic_fetch_sub_explicit(&m_import_counter, 1u, memory_order_relaxed) == 1u) { m_all_modules_imported = true; + m_asynch_cv.notify_all(); + } // Module was successfully imported, we should notify descendents. for (module_info_ptr const & d : r->m_dependents) { if (atomic_fetch_sub_explicit(&(d->m_counter), 1u, memory_order_relaxed) == 1u) {