From 0f6063af60bddd0793669f44553830762a843ce7 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Thu, 18 Sep 2014 22:02:32 -0400 Subject: [PATCH] Re-add DBI query throttling (r=dvander). --- core/logic/Database.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/logic/Database.cpp b/core/logic/Database.cpp index 99c13f10..e203eb86 100644 --- a/core/logic/Database.cpp +++ b/core/logic/Database.cpp @@ -615,6 +615,17 @@ void DBManager::ThreadMain() ke::AutoLock lock(&m_ThinkLock); m_ThinkQueue.push(op); } + + + if (!m_Terminate) + { + ke::AutoUnlock unlock(&m_QueueEvent); +#ifdef _WIN32 + Sleep(20); +#else + usleep(20000); +#endif + } } if (m_Terminate)