summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-07-14 23:21:28 +0100
committerDinnerbone <dinnerbone@dinnerbone.com>2011-07-14 23:21:28 +0100
commit43492ab6af1bf3502ed5a49550dcbb0c0a8a3fce (patch)
tree04e8bada480942ac284be7c01468669710c441cf /src/main
parent4a932c11dea3444c582f6de3e714d1a644eb7760 (diff)
downloadcraftbukkit-43492ab6af1bf3502ed5a49550dcbb0c0a8a3fce.tar
craftbukkit-43492ab6af1bf3502ed5a49550dcbb0c0a8a3fce.tar.gz
craftbukkit-43492ab6af1bf3502ed5a49550dcbb0c0a8a3fce.tar.lz
craftbukkit-43492ab6af1bf3502ed5a49550dcbb0c0a8a3fce.tar.xz
craftbukkit-43492ab6af1bf3502ed5a49550dcbb0c0a8a3fce.zip
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 https://github.com/Bukkit/CraftBukkit/commit/3632d99122e8795cadb8f94e14e42eb4aa6d7c4c#commitcomment-478252
This reverts commit 3632d99122e8795cadb8f94e14e42eb4aa6d7c4c.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 815b238d..02066909 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -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;