-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement Send for process::Command on unix #47760
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks! Since Also, could you be sure to add a test for this as well? |
Implementing Send for a specific field rather than the whole struct is safer: if a field is changed/modified and becomes non-Send, we can catch it.
@alexcrichton thanks for reviewing! I added the test |
@bors: r+ THanks @little-dude! |
📌 Commit 077d343 has been approved by |
@bors: rollup |
This is an attempt to provide a sync api, which makes much more sense for expect. The idea is to run the event loop in a separate thread so that we can call `Future::wait()` in the client handle without preventing the event loop from making progress. Note that this currently rely on rust-lang/rust#47760 Fwiw, running our own even loop is not considered good practice, but it the approach reqwest has taken too, so I guess it's not that bad.
implement Send for process::Command on unix closes rust-lang#47751
implement Send for process::Command on unix closes rust-lang#47751
closes #47751