diff --git a/src/library/module.cpp b/src/library/module.cpp index 6505a9e24..743a89812 100644 --- a/src/library/module.cpp +++ b/src/library/module.cpp @@ -291,6 +291,8 @@ struct import_modules_fn { } void process_asynch_tasks() { + if (m_asynch_tasks.empty()) + return; std::vector> extra_threads; std::vector> thread_exceptions(m_num_threads - 1); for (unsigned i = 0; i < m_num_threads - 1; i++) { diff --git a/tests/lua/mod4.lua b/tests/lua/mod4.lua new file mode 100644 index 000000000..538a4709f --- /dev/null +++ b/tests/lua/mod4.lua @@ -0,0 +1 @@ +local env = import_modules({})