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

isahc::Body is !Sync #172

Closed
yoshuawuyts opened this issue Mar 2, 2020 · 3 comments
Closed

isahc::Body is !Sync #172

yoshuawuyts opened this issue Mar 2, 2020 · 3 comments
Labels
enhancement Make a feature better
Milestone

Comments

@yoshuawuyts
Copy link

Hi! In order to fix http-rs/surf#97 and other issues, we've been working on a new set of libraries, including http-types. One feature this includes is that the Body type implements Send + Sync.

However as we've started migrating to http-types (http-rs/http-client#22), we've noticed that isahc::Body is !Sync. We were wondering if it'd be possible to change this? Thanks heaps!

@sagebind
Copy link
Owner

sagebind commented Mar 2, 2020

Seems reasonable to me. The only thing preventing it from being Sync currently is that you are allowed to create a Body from an AsyncRead that doesn't implement Sync, but this is probably very uncommon. Since this is a breaking change, we can add the additional restriction in the 0.9 release.

@sagebind sagebind added this to the 0.9 milestone Mar 2, 2020
@sagebind sagebind added the enhancement Make a feature better label Mar 2, 2020
@yoshuawuyts
Copy link
Author

@sagebind that would be fantastic, thanks heaps!

@sagebind
Copy link
Owner

sagebind commented Mar 6, 2020

This change is now available in the 0.9 release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Make a feature better
Projects
None yet
Development

No branches or pull requests

2 participants