Make reload thread name more useful for debugging

This commit is contained in:
embeddedt 2023-01-06 11:01:54 -05:00
parent 3695473283
commit b0dfd4a4ef
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -68,6 +68,8 @@ public class ClientLifecycleHandlerMixin {
}
}
private static int numReloads = 1;
private void startJEIAsync(Runnable whenFinishedCb) {
cancelPreviousStart();
Thread newThread = new Thread(() -> {
@ -88,7 +90,7 @@ public class ClientLifecycleHandlerMixin {
}
whenFinishedCb.run();
reloadThread = null;
}, "JEI Reload Thread");
}, "ModernFix JEI Reload Thread " + numReloads++);
newThread.setPriority(Thread.MIN_PRIORITY);
reloadThread = newThread;
newThread.start();