Skip to content
Snippets Groups Projects
Verified Commit 3e5b4084 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Dynare++: fix bug in new threading code

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.
parent 44a378bf
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment