DBG: Small ThreadExit optimization
This commit is contained in:
parent
45bb20f297
commit
529e5f1e3a
|
|
@ -38,15 +38,11 @@ void ThreadExit(DWORD ThreadId)
|
|||
{
|
||||
EXCLUSIVE_ACQUIRE(LockThreads);
|
||||
|
||||
// Don't use a foreach loop here because of the iterator erase() call
|
||||
for(auto itr = threadList.begin(); itr != threadList.end(); itr++)
|
||||
{
|
||||
if(itr->first == ThreadId)
|
||||
{
|
||||
threadList.erase(itr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Erase element using native functions
|
||||
auto itr = threadList.find(ThreadId);
|
||||
|
||||
if(itr != threadList.end())
|
||||
threadList.erase(itr);
|
||||
|
||||
EXCLUSIVE_RELEASE();
|
||||
GuiUpdateThreadView();
|
||||
|
|
|
|||
Loading…
Reference in New Issue