When OysterThread was idle it was using a lot of cpu power.
This commit is contained in:
parent
0cb7940bae
commit
203220f43b
|
@ -193,8 +193,11 @@ using namespace Utility::DynamicMemory;
|
|||
if(w->msec > 0)
|
||||
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();
|
||||
}
|
||||
}
|
||||
static void ThreadingFunction(ThreadData* w)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue