3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 20:40:08 +01:00

Revert "Do not immediately re-queue repeating tasks, or they may simply keep repeating on this tick, until the 35ms time limit runs out." See 3632d99122 (commitcomment-478252)

This reverts commit 3632d99122e8795cadb8f94e14e42eb4aa6d7c4c.
Dieser Commit ist enthalten in:
Dinnerbone 2011-07-14 23:21:28 +01:00
Ursprung 4a932c11de
Commit 43492ab6af

Datei anzeigen

@ -49,7 +49,6 @@ public class CraftScheduler implements BukkitScheduler, Runnable {
long firstTick = -1;
long currentTick = -1;
CraftTask first = null;
TreeMap<CraftTask, Boolean> nextQueue = new TreeMap<CraftTask, Boolean>();
do {
synchronized (schedulerQueue) {
first = null;
@ -65,7 +64,7 @@ public class CraftScheduler implements BukkitScheduler, Runnable {
processTask(first);
if (first.getPeriod() >= 0) {
first.updateExecution();
nextQueue.put(first, first.isSync());
schedulerQueue.put(first, first.isSync());
}
} else {
stop = true;
@ -79,10 +78,6 @@ public class CraftScheduler implements BukkitScheduler, Runnable {
}
} while (!stop);
synchronized (schedulerQueue) {
schedulerQueue.putAll(nextQueue);
}
long sleepTime = 0;
if (first == null) {
sleepTime = 60000L;