Skip to content

Conversation

@notoriaga
Copy link
Contributor

Figured out a way to show/test an issue I've talked about before

error: future cannot be sent between threads safely
   --> crates/esthri/tests/integration/send_sync.rs:77:22
    |
77  |           require_send(&$value);
    |                        ^^^^^^^ future is not `Send`
...
115 | / async_assert_fn!(
116 | |     esthri::upload(_, &str, &str, &Path, opts::EsthriPutOptParams): Send & !Sync & !Unpin
117 | | );
    | |_- in this macro invocation
    |
    = help: the trait `Sync` is not implemented for `(dyn Stream<Item = Result<esthri_internals::hyper::body::Bytes, std::io::Error>> + std::marker::Send + 'static)`
note: required by a bound in `require_send`
   --> crates/esthri/tests/integration/send_sync.rs:41:20
    |
41  | fn require_send<T: Send>(_t: &T) {}
    |                    ^^^^ required by this bound in `require_send`
    = note: this error originates in the macro `async_assert_fn_send` which comes from the expansion of the macro `async_assert_fn` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: `esthri` (test "integration") generated 2 warnings

namely that the futures returned by some of the functions aren't Send which can make them more challenging to work with

@silverjam silverjam force-pushed the master branch 2 times, most recently from 0be51c8 to 66d2506 Compare February 4, 2023 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants