You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the crate with wasm-bindgen and async-std and it fails to compile with the following errors.
error: future cannot be sent between threads safely
--> /Users/ander/.cargo/registry/src/github.com-1ecc6299db9ec823/backoff-0.4.0/src/future.rs:237:9
|
237 | Box::pin(::async_std_1::task::sleep(dur))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `std::marker::Send` is not implemented for `*mut u8`
note: future is not `Send` as this value is used across an await
--> /Users/ander/.cargo/registry/src/github.com-1ecc6299db9ec823/async-std-1.12.0/src/io/timeout.rs:43:5
|
40 | timeout: timer_after(dur),
| ---------------- has type `async_std::utils::timer::Timer` which is not `Send`
...
43 | .await
| ^^^^^^ await occurs here, with `timer_after(dur)` maybe used later
44 | }
| - `timer_after(dur)` is later dropped here
= note: required for the cast from `impl Future<Output = ()>` to the object type `dyn Future<Output = ()> + std::marker::Send`
error: future cannot be sent between threads safely
--> /Users/ander/.cargo/registry/src/github.com-1ecc6299db9ec823/backoff-0.4.0/src/future.rs:237:9
|
237 | Box::pin(::async_std_1::task::sleep(dur))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future is not `Send`
|
= help: the trait `std::marker::Send` is not implemented for `(dyn FnMut() + 'static)`
note: future is not `Send` as this value is used across an await
--> /Users/ander/.cargo/registry/src/github.com-1ecc6299db9ec823/async-std-1.12.0/src/io/timeout.rs:43:5
|
40 | timeout: timer_after(dur),
| ---------------- has type `async_std::utils::timer::Timer` which is not `Send`
...
43 | .await
| ^^^^^^ await occurs here, with `timer_after(dur)` maybe used later
44 | }
| - `timer_after(dur)` is later dropped here
= note: required for the cast from `impl Future<Output = ()>` to the object type `dyn Future<Output = ()> + std::marker::Send`
The text was updated successfully, but these errors were encountered:
I use the crate with
wasm-bindgen
andasync-std
and it fails to compile with the following errors.The text was updated successfully, but these errors were encountered: