0

I have a small multithreaded console server, I have one thread writing the server status to the console (connected clients and so on) and another listeing the console for commands (kick, delete, add, etc)

My problem is that the output thread needs to update the console every second or so, and once the output thread updates the console anything writen there is lost as it is overwritten... How do I bypass this? Best fix would be not updating the last line and keep it to the commands, but i don't know how to accomplish that.

Other fix would be manual update but i'm trying to avoid that

DarkW
  • 575
  • 1
  • 6
  • 18
  • how does that help me? My problem isn't communicating betwen threads, it's that i have a thread that is writing to the console while another is reading commands that the user can input or not – DarkW Apr 15 '14 at 02:37
  • You would need some way to control terminal scrolling/windowing etc. There might be some useful libs mentioned here: http://stackoverflow.com/questions/439799/whats-a-good-java-curses-like-library-for-terminal-applications – clstrfsck Apr 15 '14 at 02:52

0 Answers0