Byron / dua-cli

View disk space usage and delete unwanted data, fast.
https://lib.rs/crates/dua-cli
MIT License
4.19k stars 113 forks source link

Changed sync stdin to async stdin #5

Closed tsathishkumar closed 5 years ago

tsathishkumar commented 5 years ago

This simple fix should allow reading user input while traversing the filesystem. I haven't tested it though!

ghost commented 5 years ago

Thanks a bunch, it's good to know there is some support within Termion - will have a look at the example! Indeed, right now everything is synchronous. However, I am afraid it takes more than that to allow asynchronous operation. There is a separate function, initialize(), which deals with traversal and GUI updates during traversal, and all that even without processing events. Thus this change will have no effect at all.

If you like you can transform this into an issue - indeed, async operation would be nice.

ghost commented 5 years ago

I had a look at the example and believe the async_stdin capability can truly help - it definitely needs additional implementation and testing, but I am happy to give it a try at some point.

ghost commented 5 years ago

Closed in favour of #6 .