fix(kernel/module): non-termination

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-05-23 15:12:47 -07:00
parent e4f09335ce
commit 879572ee7e
2 changed files with 3 additions and 0 deletions

View file

@ -291,6 +291,8 @@ struct import_modules_fn {
} }
void process_asynch_tasks() { void process_asynch_tasks() {
if (m_asynch_tasks.empty())
return;
std::vector<std::unique_ptr<interruptible_thread>> extra_threads; std::vector<std::unique_ptr<interruptible_thread>> extra_threads;
std::vector<std::unique_ptr<exception>> thread_exceptions(m_num_threads - 1); std::vector<std::unique_ptr<exception>> thread_exceptions(m_num_threads - 1);
for (unsigned i = 0; i < m_num_threads - 1; i++) { for (unsigned i = 0; i < m_num_threads - 1; i++) {

1
tests/lua/mod4.lua Normal file
View file

@ -0,0 +1 @@
local env = import_modules({})