3 Oct
2008
3 Oct
'08
8:37 p.m.
On Fri, Oct 3, 2008 at 3:50 PM, amit khandelwal
I am getting an assertion in boost::mutex while using static mutex variables. Below is the stack trace for that.
void boost::mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed.
Was the assertion failure for pthread_mutex_lock(), or pthread_mutex_destroy()? Your assertion message has the former, but the back-trace indicates the latter. Either way, the cause might be static initialization order. Do you have a global object whose destructor makes use (directly, or indirectly through any contained classes' destructors) of a mutex which is also part of some global object? -- Matthew L. Creech