for (BOOL bStayInPool = TRUE; bStayInPool && pThis->m_bTimeToKill == false; )
{
/************************************************************************/
if (!bError)
{
// Allocate another thread to the thread Pool?
if (nBusyThreads == pThis->m_nCurrentThreads)
{
if (nBusyThreads < pThis->m_nThreadPoolMax)
{
if (pThis->m_cpu.GetUsage() > pThis->m_nCPUHiThreshold)
{
UINT nThreadID = -1;
// HANDLE hThread = (HANDLE)_beginthreadex(NULL, // Security
// 0, // Stack size - use default
// ThreadPoolFunc, // Thread fn entry point
/// (void*) pThis,
// 0, // Init flag
// &nThreadID); // Thread address
// CloseHandle(hThread);
}
}
}
// Thread timed out - IDLE?
if (!bIORet && dwIOError == WAIT_TIMEOUT)
{
if (lpClientContext == NULL)
{
if (pThis->m_cpu.GetUsage() < pThis->m_nCPULoThreshold)
{
// Thread has no outstanding IO - Server hasn't much to do so die
if (pThis->m_nCurrentThreads > pThis->m_nThreadPoolMin)
bStayInPool = FALSE;
}
bError = true;
}
}
}
}
这一段 根据CPU 使用率 改变线程的 代码 是不是没用啊。。首先 创建线程给注释掉了。。没法 增加线程
而且 bStayInPool 为 false 也不能 移去线程啊。。他的判断是两个条件。
最近刚研究 GH0ST。。希望高手给 讲解下。
谢谢
[课程]FART 脱壳王!加量不加价!FART作者讲授!