Faster spin in worker thread when doing I/O and a priority bump needed when fixing priorities.

meow-7.2.2
Monty Brandenberg 2012-06-05 12:06:42 -04:00
parent 3a9c182d7f
commit 9a11a2946f
2 changed files with 6 additions and 2 deletions

View File

@ -38,6 +38,10 @@
#include "lltimer.h"
// Tuning parameters
static const int LOOP_SLEEP_NORMAL_MS = 10; // Normal per-loop sleep in milliseconds
namespace LLCore
{
@ -198,7 +202,7 @@ void HttpService::threadRun(LLCoreInt::HttpThread * thread)
// Determine whether to spin, sleep briefly or sleep for next request
if (REQUEST_SLEEP != loop)
{
ms_sleep(50);
ms_sleep(LOOP_SLEEP_NORMAL_MS);
}
}

View File

@ -736,7 +736,7 @@ void LLTextureFetchWorker::setDesiredDiscard(S32 discard, S32 size)
if ((prioritize && mState == INIT) || mState == DONE)
{
mState = INIT;
U32 work_priority = mWorkPriority | LLWorkerThread::PRIORITY_LOW;
U32 work_priority = mWorkPriority | LLWorkerThread::PRIORITY_HIGH;
setPriority(work_priority);
}
}