mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-23 08:54:12 +08:00
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…
x
Reference in New Issue
Block a user