So, the linux top command has the real time-like loop with console output (nothing fancy), but it uses non-blocking console input which doesn’t display typed character in the command line. How it’s done? Is there any library for it, do they use threads? I need to write an linux app with the same style (used via ssh) and I have no idea how to do that input (cin in separate thread isn’t the solution, top uses something other).
So, the linux top command has the real time-like loop with console output (nothing
Share
One solution is to use an implementation of curses.
I don’t know how
topdoes it.