Don't show mutex as blocked, if there are no locks held.

This commit is contained in:
Bartosz Taudul 2017-12-10 20:53:20 +01:00
parent 171e962f97
commit ea604d484d

View File

@ -3067,7 +3067,14 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
}
case LockState::WaitLock:
{
ImGui::Text( "Thread \"%s\" is blocked by other thread:", GetThreadString( tid ) );
if( (*vbegin)->lockCount > 0 )
{
ImGui::Text( "Thread \"%s\" is blocked by other thread:", GetThreadString( tid ) );
}
else
{
ImGui::Text( "Thread \"%s\" waits to obtain lock after release by thread:", GetThreadString( tid ) );
}
ImGui::Indent( ty );
ImGui::Text( "\"%s\"", GetThreadString( lockmap.threadList[(*vbegin)->lockingThread] ) );
ImGui::Unindent( ty );