Merge 1.19.2 into 1.19.4

This commit is contained in:
embeddedt 2023-07-20 20:18:45 -04:00
commit f9315a127f
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -65,12 +65,16 @@ public class ModernFixMixinPlugin implements IMixinConfigPlugin {
ModernFixPlatformHooks.injectPlatformSpecificHacks(); ModernFixPlatformHooks.injectPlatformSpecificHacks();
if(ModernFixMixinPlugin.instance.isOptionEnabled("feature.spam_thread_dump.ThreadDumper")) { if(ModernFixMixinPlugin.instance.isOptionEnabled("feature.spam_thread_dump.ThreadDumper")) {
// run once to trigger classloading
ThreadDumper.obtainThreadDump();
Thread t = new Thread() { Thread t = new Thread() {
public void run() { public void run() {
while(true) { while(true) {
logger.error("------ DEBUG THREAD DUMP (occurs every 60 seconds) ------"); try {
logger.error(ThreadDumper.obtainThreadDump()); Thread.sleep(60000);
try { Thread.sleep(60000); } catch(InterruptedException e) {} logger.error("------ DEBUG THREAD DUMP (occurs every 60 seconds) ------");
logger.error(ThreadDumper.obtainThreadDump());
} catch(InterruptedException | RuntimeException e) {}
} }
} }
}; };