fix: Adds idle cpu config and forces on in debug (#790)
* Adds `core.enableIdleCPU` to modernuo.json * Forces idle CPU on in DEBUG * Reverts idle detection back to CPS
This commit is contained in:
parent
b6641c4853
commit
56c348ac68
7 changed files with 52 additions and 80 deletions
|
|
@ -55,7 +55,7 @@ namespace Server
|
|||
evt.WaitOne();
|
||||
}
|
||||
|
||||
public int ExecuteTasks()
|
||||
public void ExecuteTasks()
|
||||
{
|
||||
if (Thread.CurrentThread != _mainThread)
|
||||
{
|
||||
|
|
@ -66,15 +66,11 @@ namespace Server
|
|||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (!_queue.TryDequeue(out var a))
|
||||
if (_queue.TryDequeue(out var a))
|
||||
{
|
||||
return count;
|
||||
a();
|
||||
}
|
||||
|
||||
a();
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue