-
Notifications
You must be signed in to change notification settings - Fork 68
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
Rework the API for I/O safety #123
Conversation
@smol-rs/admins Can anyone review this PR? Given that this change will have ecosystem wide effects, I'd like to make sure this is what we want. |
Make sure to also review the corresponding PR for |
@taiki-e You have good judgement when it comes to this sort of thing, so I'll defer to you before I merge this. |
I'll merge this now and we can discuss the changes in greater depth later. |
This reworks the
polling
API with I/O safety in mind. See #38 and smol-rs/smol#244 for more information.This is a breaking change that makes the
add()
family of functionsunsafe
. I am very open to alternatives to this change.The indirect effects of this change is that is makes
async_io::Async::get_mut
andread/write_with_mut
unsafe, as well as having implications for theAsyncRead/AsyncWrite
impls as well. See smol-rs/async-io#142. I would appreciate community feedback on these changes.