Tweak task scheduling for less tps impact
This commit is contained in:
parent
29794d4ccd
commit
cc97c8d21e
@ -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 {
|
||||
|
@ -410,7 +410,7 @@ public abstract class TaskManager {
|
||||
}
|
||||
}
|
||||
};
|
||||
TaskManager.IMP.task(run);
|
||||
SetQueue.IMP.addTask(run);
|
||||
try {
|
||||
synchronized (function) {
|
||||
while (running.get()) {
|
||||
|
Loading…
Reference in New Issue
Block a user