Skip to content

Add TryFrom impls to convert async types to corresponding sync types #1014

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

Merged

Conversation

joshtriplett
Copy link
Contributor

Add TryFrom implementations to convert TcpListener, TcpStream,
UdpSocket, UnixDatagram, UnixListener, and UnixStream to their
synchronous equivalents, including putting them back into blocking mode.

This does not add such an impl for File, because std::fs::File does not
provide a set_nonblocking method.

Add `TryFrom` implementations to convert `TcpListener`, `TcpStream`,
`UdpSocket`, `UnixDatagram`, `UnixListener`, and `UnixStream` to their
synchronous equivalents, including putting them back into blocking mode.
Copy link
Contributor

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These all look good! - there's a WASM build failure, but I suspect that's unrelated to this patch. Thanks for this!

@yoshuawuyts yoshuawuyts merged commit f8231d7 into async-rs:master May 1, 2022
@joshtriplett joshtriplett deleted the convert-from-async-to-sync branch May 1, 2022 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants