You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "waynexia (via GitHub)" <gi...@apache.org> on 2024/04/09 03:03:09 UTC

[I] Conditionally implement `Send` and `Sync` for wasm32-unknown-unknown target [opendal]

waynexia opened a new issue, #4437:
URL: https://github.com/apache/opendal/issues/4437

   `wasm32-unknown-unknown` only has one worker thread, it's wise to use `!Sync` structure under that precondition. But since this marker trait would affect others, it's sometimes hard to use them in a "normal" codebase (i.e., write for multi-thread but run in `wasm32-unknown-unknown`).
   
   This ticket proposes to add an opt-in feature that implements `Send` and `Sync` for `Future`s. To help enclose the `!Send` boundary. An example is https://github.com/datafusion-contrib/datafusion-wasm-bindings/blob/8ea3241119e35107c16125d17f1084e5c3e56a77/src/unsafe_opendal_store.rs.
   
    


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Conditionally implement `Send` and `Sync` for wasm32-unknown-unknown target [opendal]

Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on issue #4437:
URL: https://github.com/apache/opendal/issues/4437#issuecomment-2044098158

   Sure, please assign 👍 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Conditionally implement `Send` and `Sync` for wasm32-unknown-unknown target [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #4437:
URL: https://github.com/apache/opendal/issues/4437#issuecomment-2044082091

   Need sometime to think about this change. 
   
   
   - What do you think about [`send_wrapper`](https://docs.rs/send_wrapper)?
   - Do you think it's a more like ecosystem issue that all of datafusion, object_store should accept non-send future instead? For example, use `#[async_trait(?Send)]` on trait?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Conditionally implement `Send` and `Sync` for wasm32-unknown-unknown target [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo closed issue #4437: Conditionally implement `Send` and `Sync` for wasm32-unknown-unknown target
URL: https://github.com/apache/opendal/issues/4437


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Conditionally implement `Send` and `Sync` for wasm32-unknown-unknown target [opendal]

Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on issue #4437:
URL: https://github.com/apache/opendal/issues/4437#issuecomment-2044092591

   >What do you think about [send_wrapper](https://docs.rs/send_wrapper)?
   
   Looks OK to me. What we need after all is a simple wrapper.
   
   >Do you think it's a more like ecosystem issue 
   
   Yes and no. It would be better for the entire ecosystem to consider `!Send` scenarios. But this would increase the burden of maintenance (by a lot), and there would likely be some libraries that not doing so. Also this change may influence end users, causing some long compile errors. I had a speech about developing under a single-thread environment ([blog in Chinese](https://blog.waynest.com/2022/06/tpc-practice/#It-takes), it's not yet translated and organized, sorry for the inconvenient...). The dark side is where you touch `!Send`, the entire codebase from dep to your code is forced to handle it. Thus we could do this first before the ecosystem is mature enough.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Conditionally implement `Send` and `Sync` for wasm32-unknown-unknown target [opendal]

Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on issue #4437:
URL: https://github.com/apache/opendal/issues/4437#issuecomment-2044076363

   I'd like to open a PR to include the change from `unsafe_opendal_store` to `opendal_object_store` if it makes sense


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Conditionally implement `Send` and `Sync` for wasm32-unknown-unknown target [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #4437:
URL: https://github.com/apache/opendal/issues/4437#issuecomment-2044097068

   Makes sense to me. It's reasonable to include [send_wrapper](https://docs.rs/send_wrapper) in the opendal object store integration for wasm32 targets, as it's necessary for building.
   
   Would you like to take this issue?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org