-
Notifications
You must be signed in to change notification settings - Fork 715
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Doesn't compile on my machine with wasm32-unknown-unknown
Steps to Reproduce
cd integrations/object_store
cargo build --release --target wasm32-unknown-unknown --features "send_wrapper"
Will see:
error[E0277]: `dyn futures::Future<Output = ()>` cannot be sent between threads safely
--> /opendal/core/src/types/execute/executors/tokio_executor.rs:28:42
|
28 | let _handle = tokio::task::spawn(f);
| ------------------ ^ `dyn futures::Future<Output = ()>` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `std::marker::Send` is not implemented for `dyn futures::Future<Output = ()>`, which is required by `Pin<Box<dyn futures::Future<Output = ()>>>: std::marker::Send`
= note: required for `Unique<dyn futures::Future<Output = ()>>` to implement `std::marker::Send`
note: required because it appears within the type `Box<dyn futures::Future<Output = ()>>`
Expected Behavior
Should compile.
I saw some special handling on wasm + Send bound, but I have not fully understand why we need them yet.
Additional Context
No response
Are you willing to submit a PR to fix this bug?
- Yes, I would like to submit a PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working