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

I/O objects should be Freeze #12139

Closed
alexcrichton opened this issue Feb 9, 2014 · 5 comments
Closed

I/O objects should be Freeze #12139

alexcrichton opened this issue Feb 9, 2014 · 5 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@alexcrichton
Copy link
Member

All of I/O uses inherited mutability, so the I/O objects themselves should be Freeze. The reason that they aren't right now is because the trait objects underneath all of them are Send, not Send + Freeze.

@lpy
Copy link
Contributor

lpy commented Feb 11, 2014

Hi! I would like to give a shot, could you please give me some guide?

@alexcrichton
Copy link
Member Author

Each I/O object inside of std::io contains a trait object of the form ~RtioIoComponent, you'll need to change that to ~RtioIoComponent: Send + Freeze and then basically just deal with the fallout everywhere.

@trevorriles
Copy link

Taking a peek at this myself. Would I begin in the src/libstd/rt/rtio.rs file, changing the public trait definitions to inherit Send and Freeze?

@alexcrichton
Copy link
Member Author

In theory that should also work, yes.

@alexcrichton
Copy link
Member Author

Freeze was removed in #13076, and I/O objects are definitely not Share

bors added a commit to rust-lang-ci/rust that referenced this issue Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants