Keeping command execution in separate thread

This commit is contained in:
Marc Baloup 2022-12-02 13:06:04 +01:00
parent f3efe00b8b
commit f0540a8942
Signed by: marcbal
GPG Key ID: BBC0FE3ABC30B893

View File

@ -68,7 +68,8 @@ public class CLI extends Thread {
while((line = reader.readLine()) != null) {
if (line.trim().equals(""))
continue;
CLIBrigadierDispatcher.instance.execute(line);
String cmdLine = line;
new Thread(() -> CLIBrigadierDispatcher.instance.execute(cmdLine), "CLICmdThread #"+(i++)).start();
}
} catch (IOException e) {
Log.severe(e);