Skip to content

Conversation

Aderinom
Copy link

@Aderinom Aderinom commented Sep 4, 2025

Related Issue: #2351

Adds documentation for the required Gurantees to allow a noop poll to send/read_datagram function to act as a try_write/try_recv similar to e.g. Tokio UDP Socket

@gretchenfrage
Copy link
Collaborator

Thank you! Always love a docs enhancement.

Now, I'm not opposed to this per se, but I do wanna take a moment to step back and question whether this is the right path to take regardless:

In principle, it shouldn't be that hard for a caller to perform the action of "poll a future, and if it returns Pending but also notifies its Waker before even returning, then poll it again, and repeat." It seems like the main thing holding this back is a slightly weird lack of any established library for it (see e.g. my own code where I modified the pollster crate to be able to do that, but that's a bad example because that code is also doing other weirder things). We could simply not commit to doing this, and expect our users to do it instead. In contrast to cancel safety, this doesn't substantively what functionality we are providing.

Thoughts @djc @Ralith?

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