-
Notifications
You must be signed in to change notification settings - Fork 638
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
Should BoxFuture/BoxStream require Sync? #1752
Comments
|
More specifically the bug that Hyper is running into appears to be rust-lang/rust#59245 (via rust-lang/rust#57017 causing the It seems to me that it's definitely a bug in the generator transform, if the reference is internal then there's no need for the referenced value to be Either way, is there a downside to adding |
We now have |
I was just looking at testing integrating some code with Hyper's master branch. The first problem I came across was that the existing code uses
BoxStream
to represent its body type, which cannot be converted intohyper::Body
because it additionally wantsSync
on the trait object:I don't see why
Sync
would be necessary, since I see no usecases where the type is accessed concurrently from different threads, but it seems to be pretty common to require both markers for trait objects (e.g. there isInto<Box<dyn Error + Send + Sync>>
but notInto<Box<dyn Error + Send>>
which I have run into, and seen others run into, multiple times).I can't think of any
Send + !Sync
type right now, and it seems like a niche usecase if they do exist.cc @seanmonstar
The text was updated successfully, but these errors were encountered: