refactor: use Thread for console line processing

This commit is contained in:
ChomeNS
2024-12-05 14:46:13 +07:00
parent f25618d4c1
commit 4600eaf942

View File

@@ -37,7 +37,7 @@ public class ConsolePlugin implements Completer {
final String prompt = "> ";
Main.executorService.submit(() -> {
final Thread thread = new Thread(() -> {
while (true) {
String line = null;
try {
@@ -49,6 +49,9 @@ public class ConsolePlugin implements Completer {
handleLine(line);
}
});
thread.setName("Console Thread");
thread.start();
}
@Override