Boost logo

Boost Users :

Subject: [Boost-users] Thread locks
From: Larry E. Ramey (ramey_at_[hidden])
Date: 2009-02-02 17:59:45


Under 1.33.1 we used to do this:

 boost::try_mutex::scoped_try_lock lock(m_mutex);
  if (lock.locked() && m_threadState == UploadMap)
  {

I'm not sure, but I think under 1.37 I should do:

 boost::try_mutex::scoped_try_lock lock(m_mutex);
  if (lock.owns_lock() && m_threadState == UploadMap)
  {

When I do that, I get a crash when I exit that I never used to have.

Any ideas?
Larry


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net