When OysterThread was idle it was using a lot of cpu power.
This commit is contained in:
parent
0cb7940bae
commit
203220f43b
|
@ -194,8 +194,11 @@ using namespace Utility::DynamicMemory;
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(w->msec));
|
std::this_thread::sleep_for(std::chrono::milliseconds(w->msec));
|
||||||
|
|
||||||
while (w->state == OYSTER_THREAD_STATE_IDLE)
|
while (w->state == OYSTER_THREAD_STATE_IDLE)
|
||||||
|
{
|
||||||
|
CheckPriority(w);
|
||||||
std::this_thread::yield();
|
std::this_thread::yield();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
static void ThreadingFunction(ThreadData* w)
|
static void ThreadingFunction(ThreadData* w)
|
||||||
{
|
{
|
||||||
CheckStatus(w);
|
CheckStatus(w);
|
||||||
|
|
Loading…
Reference in New Issue