Tweak task scheduling for less tps impact

This commit is contained in:
Jesse Boyd 2018-06-24 21:53:28 +10:00
parent 29794d4ccd
commit cc97c8d21e
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ public class SetQueue {
long currentAllocate = allocate - absDiff;
if (!emptyTasks) {
long taskAllocate = empty ? currentAllocate : currentAllocate >> 1;
long taskAllocate = activeQueues.isEmpty() ? currentAllocate : 1 + (currentAllocate >> 1);
long used = 0;
boolean wait = false;
do {

View File

@ -410,7 +410,7 @@ public abstract class TaskManager {
}
}
};
TaskManager.IMP.task(run);
SetQueue.IMP.addTask(run);
try {
synchronized (function) {
while (running.get()) {