in reply to Append a tools status to the command line..
Another way will let you avoid periodic writes of current progress and employs fifos or named pipes. This isn't easier to implement and won't probably run much faster, but is indeed a different way to do it.
You should arrange a progress-writer thread (or process, but this will make the whole thing even more evil) which will just write current progress into a fifo in an endless loop. Remember, if there's no reader on the other end of the fifo, then the writer will block until the reader emerges.
|
---|