-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
std::io::Error is Send but not Sync #24049
Comments
This is currently an intentional decision as by using a trait object it will always be opting out of some marker traits. The only real fundamental piece of functionality we wanted to add to |
I'm starting to think that putting an error in an |
I'm still in favor of just making |
It occurs to me that, AFAIK, we can't use smart pointers with trait objects yet. So we can't actually say |
This allows `io::Error` values to be stored in `Arc` properly. Because this requires `Sync` of any value passed to `io::Error::new()` and modifies the relevant `convert::From` impls, this is a [breaking-change] Fixes #24049.
This allows `io::Error` values to be stored in `Arc` properly. Because this requires `Sync` of any value passed to `io::Error::new()` and modifies the relevant `convert::From` impls, this is a [breaking-change] Fixes #24049.
This allows `io::Error` values to be stored in `Arc` properly. Because this requires `Sync` of any value passed to `io::Error::new()` and modifies the relevant `convert::From` impls, this is a [breaking-change] Fixes rust-lang#24049.
This allows `io::Error` values to be stored in `Arc` properly. Because this requires `Sync` of any value passed to `io::Error::new()` and modifies the relevant `convert::From` impls, this is a [breaking-change] Fixes rust-lang#24049.
The
std::io::Error
type isSend
but it's notSync
. This is because of the use ofBox<Error+Send>
, as that value is notSync
, and so thereforeio::Error
is notSync
.This is a problem for me as I want to stuff an
io::Error
into async::Arc
and have the resulting value beSend
, butArc
is onlySend
if its element type isSend + Sync
./cc @alexcrichton
The text was updated successfully, but these errors were encountered: