I've been trying to make a monitor java program that prints out some stats from concurrent threads while taking user input at the same time. And the problem i'm facing is that if a user was writing a long command "create file /home/user/etc" for example and a concurrent thread happened to print out some messages in the middle of his command. his command would be cut in half which i know won't effect the actual input i get but it ruins the user interface.I've been trying to make a monitor java program