Author Topic: mutex - owning thread?  (Read 51883 times)

Rich Hornay

  • Newbie
  • *
  • Posts: 4
    • View Profile
mutex - owning thread?
« on: May 08, 2012, 12:44:45 PM »
Is there a way to find the owning thread of a std::mutex?  It would be desirable to see this both live and especially in crash dumps.

Anthony Williams

  • Administrator
  • Full Member
  • *****
  • Posts: 103
    • View Profile
    • just::thread C++ Thread Library
Re: mutex - owning thread?
« Reply #1 on: May 08, 2012, 12:58:15 PM »
No, there isn't. The normal build of the library does not track this information. The checked build does, but this is not available outside the deadlock-detection code. For one thing, it could change between the call being made and the information being used.