Skip to content
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

add UnwindSafe impls to UdpSocket #4384

Merged
merged 5 commits into from Jan 8, 2022

Conversation

Hodkinson
Copy link
Contributor

Fixes: #4336

Motivation

Solution

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-net Module: tokio/net labels Jan 7, 2022
@Darksonn
Copy link
Contributor

Darksonn commented Jan 7, 2022

Instead of adding it to just UdpSocket, I think we should add it to PollEvented, which should make all tokio::net types unwind safe.

@Hodkinson
Copy link
Contributor Author

Makes sense, added it there instead. I also added a unit test, but can remove/refactor this if it's too much.

@Darksonn
Copy link
Contributor

Darksonn commented Jan 7, 2022

I don't mind adding some tests, but I think we should include a test that verifies that the trait is implemented on the actual tokio::net types rather than on PollEvented.

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

Seems good.

@Darksonn Darksonn merged commit ac2343d into tokio-rs:master Jan 8, 2022
@Hodkinson Hodkinson deleted the mark_udpsocket_unwindsafe branch January 8, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-net Module: tokio/net
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tokio::net::UdpSocket is not marked as UnwindSafe
2 participants