Set name of unnamed threads
This commit is contained in:
@@ -52,7 +52,7 @@ public class ChatMessageHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}, "replaymod-chat-message-handler");
|
||||
|
||||
public ChatMessageHandler() {
|
||||
t.start();
|
||||
|
||||
@@ -86,7 +86,7 @@ public class GuiPlayerOverview extends GuiScreen {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}, "replaymod-skin-loader").start();
|
||||
}
|
||||
|
||||
playerCount = players.size();
|
||||
|
||||
@@ -114,7 +114,7 @@ public class GuiLoginPrompt extends GuiScreen {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}, "replaymod-auth").start();
|
||||
}
|
||||
} else if(button.id == GuiConstants.LOGIN_CANCEL_BUTTON) {
|
||||
mc.displayGuiScreen(parent);
|
||||
|
||||
@@ -200,7 +200,7 @@ public class GuiRegister extends GuiScreen {
|
||||
message = I18n.format("replaymod.gui.login.connectionerror");
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}, "replaymod-register").start();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ public class GuiReplayCenter extends GuiScreen implements GuiYesNoCallback {
|
||||
currentTab = Tab.RECENT_FILES;
|
||||
updateCurrentList(new SearchPagination(recentFileSearchQuery));
|
||||
}
|
||||
});
|
||||
}, "replaymod-list-loader");
|
||||
currentListLoader.start();
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ public class GuiReplayCenter extends GuiScreen implements GuiYesNoCallback {
|
||||
currentTab = Tab.BEST_FILES;
|
||||
updateCurrentList(new SearchPagination(bestFileSearchQuery));
|
||||
}
|
||||
});
|
||||
}, "replaymod-list-loader");
|
||||
currentListLoader.start();
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ public class GuiReplayCenter extends GuiScreen implements GuiYesNoCallback {
|
||||
currentTab = Tab.DOWNLOADED_FILES;
|
||||
updateCurrentList(new DownloadedFilePagination());
|
||||
}
|
||||
});
|
||||
}, "replaymod-list-loader");
|
||||
currentListLoader.start();
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ public class GuiReplayCenter extends GuiScreen implements GuiYesNoCallback {
|
||||
ReplayMod.favoritedFileHandler.reloadFavorites();
|
||||
updateCurrentList(new FavoritedFilePagination());
|
||||
}
|
||||
});
|
||||
}, "replaymod-list-loader");
|
||||
currentListLoader.start();
|
||||
}
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ public class GuiUploadFile extends GuiScreen {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}, "replaymod-file-uploader").start();
|
||||
} else if(button.id == GuiConstants.UPLOAD_CANCEL_BUTTON) {
|
||||
uploader.cancelUploading();
|
||||
}
|
||||
|
||||
@@ -109,23 +109,23 @@ public class ConnectionEventHandler {
|
||||
@Override
|
||||
public void run() {
|
||||
String worldName = null;
|
||||
while(worldName == null) {
|
||||
try {
|
||||
while (true) {
|
||||
if (MinecraftServer.getServer() != null) {
|
||||
worldName = MinecraftServer.getServer().getWorldName();
|
||||
listener.setWorldName(worldName);
|
||||
return;
|
||||
|
||||
} catch(Exception e) {
|
||||
}
|
||||
if (worldName == null) {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch(InterruptedException e1) {
|
||||
e1.printStackTrace();
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
} else {
|
||||
listener.setWorldName(worldName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}).start();
|
||||
}, "replaymod-world-name-fetcher").start();
|
||||
}
|
||||
|
||||
packetListener = listener;
|
||||
|
||||
@@ -105,7 +105,7 @@ public abstract class DataListener extends ChannelInboundHandlerAdapter {
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}, "replaymod-packet-writer");
|
||||
|
||||
public DataWriter(DataOutputStream stream) {
|
||||
this.stream = stream;
|
||||
|
||||
@@ -19,7 +19,7 @@ public class ReplayFileAppender extends Thread {
|
||||
public void run() {
|
||||
ReplayFileAppender.this.shutdown();
|
||||
}
|
||||
}));
|
||||
}, "replaymod-file-appender-shutdown"));
|
||||
}
|
||||
|
||||
public void registerModifiedFile(File toAdd, String name, File replayFile) {
|
||||
|
||||
@@ -155,7 +155,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
|
||||
this.replayLength = file.metadata().get().getDuration();
|
||||
|
||||
if (asyncMode) {
|
||||
new Thread(asyncSender).start();
|
||||
new Thread(asyncSender, "replaymod-async-sender").start();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
|
||||
this.asyncMode = asyncMode;
|
||||
if (asyncMode) {
|
||||
this.terminate = false;
|
||||
new Thread(asyncSender).start();
|
||||
new Thread(asyncSender, "replaymod-async-sender").start();
|
||||
} else {
|
||||
this.terminate = true;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class ReplayScreenshot {
|
||||
TickAndRenderListener.finishScreenshot();
|
||||
}
|
||||
}
|
||||
});
|
||||
}, "replaymod-screenshot-saver");
|
||||
|
||||
ioThread.start();
|
||||
} catch(Exception exception) {
|
||||
|
||||
@@ -110,7 +110,7 @@ public class VideoWriter {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}, "replaymod-video-writer");
|
||||
writerThread.start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user