2015-02-26 11:40:16 +01:00
|
|
|
From 1447e11573baf2733066d84f7af8f3ace5671c03 Mon Sep 17 00:00:00 2001
|
2014-07-21 22:46:54 +02:00
|
|
|
From: md_5 <md_5@live.com.au>
|
|
|
|
Date: Tue, 23 Apr 2013 11:50:27 +1000
|
|
|
|
Subject: [PATCH] Thread Naming and Tweaks
|
|
|
|
|
|
|
|
Removes the sleep forever thread and adds useful names for debugging to all staged thread files.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
2014-08-09 00:15:42 +02:00
|
|
|
index 8442ecb..93d8d42 100644
|
2014-07-21 22:46:54 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
2014-08-09 00:15:42 +02:00
|
|
|
@@ -72,7 +72,7 @@ public class CraftScheduler implements BukkitScheduler {
|
2014-07-21 22:46:54 +02:00
|
|
|
*/
|
|
|
|
private final ConcurrentHashMap<Integer, CraftTask> runners = new ConcurrentHashMap<Integer, CraftTask>();
|
|
|
|
private volatile int currentTick = -1;
|
|
|
|
- private final Executor executor = Executors.newCachedThreadPool();
|
|
|
|
+ private final Executor executor = Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %1$d").build()); // Spigot
|
|
|
|
private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {@Override StringBuilder debugTo(StringBuilder string) {return string;}};
|
|
|
|
private CraftAsyncDebugger debugTail = debugHead;
|
|
|
|
private static final int RECENT_TICKS;
|
|
|
|
--
|
2014-11-28 02:17:45 +01:00
|
|
|
2.1.0
|
2014-07-21 22:46:54 +02:00
|
|
|
|