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;
|
long currentAllocate = allocate - absDiff;
|
||||||
|
|
||||||
if (!emptyTasks) {
|
if (!emptyTasks) {
|
||||||
long taskAllocate = empty ? currentAllocate : currentAllocate >> 1;
|
long taskAllocate = activeQueues.isEmpty() ? currentAllocate : 1 + (currentAllocate >> 1);
|
||||||
long used = 0;
|
long used = 0;
|
||||||
boolean wait = false;
|
boolean wait = false;
|
||||||
do {
|
do {
|
||||||
|
@ -410,7 +410,7 @@ public abstract class TaskManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
TaskManager.IMP.task(run);
|
SetQueue.IMP.addTask(run);
|
||||||
try {
|
try {
|
||||||
synchronized (function) {
|
synchronized (function) {
|
||||||
while (running.get()) {
|
while (running.get()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user