i want to get the output from 'Command::new()' without blocking the user input .if the command takes too long then user input is blocked . whenever i come up with something rust says no. thank u for help
To get the full output you need to wait for the command until it generate them all. How do you want to wait it without blocking? What do you want to do until it's done?
i mean that is what make sense.so i guess there will be blocking the userinput.
I feel like you may want two threads: one for reading and acting on user input, and the second for waiting on the process. If you need intermediate output from the process, then the second one can spawn the command and read the child stdout line by line, sending it by a channel to the main "user actions" thread.
It sounds like you are asking about async tasks, but it is not clear. I think you need to explain more about the situation before you can get any concrete advice.
honestly sounds good.Let me try this
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.