use size of hashtable instead of total threads created for thread cap
This commit is contained in:
parent
0b7db9e5ca
commit
e126e4c4f3
@ -35,7 +35,7 @@ namespace
|
||||
LOCK(hostMutex);
|
||||
TextThread *it;
|
||||
if ((it = textThreadsByParams[tp]) == nullptr)
|
||||
if (TextThread::ThreadCounter < MAX_THREAD_COUNT)
|
||||
if (textThreadsByParams.size() < MAX_THREAD_COUNT)
|
||||
OnCreate(it = textThreadsByParams[tp] = new TextThread(tp, Host::GetHookParam(tp).type));
|
||||
else return Host::AddConsoleOutput(L"too many text threads: stopping");
|
||||
it->AddText(text, len);
|
||||
|
Loading…
Reference in New Issue
Block a user