du: start printing output immediately#5552
Conversation
|
This is not ready for review yet, just wanted to get the initial proof of concept out there. It definitely still needs a lot of refinement and cleaning up. My current solution uses a separate thread for printing, but if that's overkill for this situation then I can switch things back to a single-threaded implementation (please let me know if you have any strong opinions on this!). |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
…StatPrinter` to handle printing thread logic
…tion of printing-related variables into `StatPrinter::new`
|
GNU testsuite comparison: |
This test seems to be failing intermittently, likely due to some specific interleaving of prints from the main thread (which still prints some errors) and the printing thread. I haven't been able to reproduce the failure locally yet. Will dig into this more. Edit: As I suspected, the error message (which is coming from the main thread) is being interleaved with the output from the printing thread. This should be pretty fixable. |
…nting a single stat our into its own method in `StatPrinter`
|
GNU testsuite comparison: |
… error messages and regular output message are written one at a time
|
GNU testsuite comparison: |
|
Good work, thanks :) |
This PR updates
duso that it continuously prints output as it is running, as opposed to waiting until all of the data has been collected before printing anything. A separate thread has been added which handles printing data (and errors) as they are produced by the main thread.Fixes #5516