• Sébastien Villemot's avatar
    Dynare++: fix bug in new threading code · 3e5b4084
    Sébastien Villemot authored
    At the end of a thread, we must first notify the main thread waiting on the
    condition variable, then unlock the mutex. We must do these two operations in
    that order, otherwise there is a possibility of having the main process
    destroying the condition variable before the thread tries to notify it (if all
    other threads terminate at the same time and bring the counter down to zero).
    For that reason, we cannot use std::notify_all_at_thread_exit().
    
    Bug introduced in commit 752a02a3.
    3e5b4084
Name
Last commit
Last update
README Loading commit data...
contrib Loading commit data...
doc Loading commit data...
dynare++ Loading commit data...
examples Loading commit data...
julia Loading commit data...
m4 Loading commit data...
matlab Loading commit data...
mex Loading commit data...
osx Loading commit data...
others Loading commit data...
preprocessor @ 1e071ca4 Loading commit data...
scripts Loading commit data...
tests Loading commit data...
windows Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.gitmodules Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README.md Loading commit data...
VERSION.in Loading commit data...
configure.ac Loading commit data...
license.txt Loading commit data...