Our application is quite large and it's hard to determine what exactly
is triggering the error. But the exception itself happens in the wait
method in condition_variable_any.
Actually, I do seem some calls to timed_wait so I think I might be
running into similar errors. Could you point me to how others have
resolved the problem?
The error message that's displayed is:
terminate called after throwing an instance of
'boost::exception_detail::clone_impl
' what(): boost::lock_error And I've confirmed that the error only exists when using Boost 1.45, not Boost 1.38.
Here is what the wait method looks like in Boost 1.45:
template<typename lock_type>
void wait(lock_type& m)
{
int res=0;
{
thread_cv_detail::lock_on_exit
Ven Tadipatri
writes: Hi, We upgraded our project from using Boost 1.38 to Boost 1.45 but now seem to be having some thread issues. The error doesn't happen for every run, but occasionally the wait method in condition_variable_any fails. At other times the program seems to run into an infinite loop, presumably waiting for a lock that's never released. I looked at the changes in http://www.boost.org/doc/libs/1_45_0/doc/html/thread/changes.html but don't see what could be causing the error to occur only after upgrading to Boost 1.45. Has anyone else experienced their code breaking when upgrading to the latest version of Boost? This seems similar to the problems people have experience with boost::this_thread::sleep (which I cannot reproduce), which relies on condition_variable::timed_wait.
I don't think anything significant has changed in that area, so it surprises me that you are experiencing problems only after upgrading.
Can you give more information about the problem? A small sample application that demonstrates it would be nice.
Anthony