Forked from
Dynare / preprocessor
Source project has a limited visibility.
-
Sébastien Villemot authored
— No longer call std::exit() from threads when compilation fails, that function is marked as not thread-safe under GNU/Linux; and it leads to deadlocks under Windows. Rather store the list of failed objects, and exit with a message and an error code from the main thread when that list is not empty at the end of preprocessing. – Fix the condition used for waiting until all compilation threads finish; checking that the queue is empty is not enough, since a compilation may be ongoing. So also track objects whose compilation is ongoing.
Sébastien Villemot authored— No longer call std::exit() from threads when compilation fails, that function is marked as not thread-safe under GNU/Linux; and it leads to deadlocks under Windows. Rather store the list of failed objects, and exit with a message and an error code from the main thread when that list is not empty at the end of preprocessing. – Fix the condition used for waiting until all compilation threads finish; checking that the queue is empty is not enough, since a compilation may be ongoing. So also track objects whose compilation is ongoing.