JsValue isn't Send/Sync since #955 . This prevents the use of OnceCell-like things and futures_util's Shared. I may hack up my own in the meantime, but would it make sense to have a similar LocalShared that can't be sent across threads?
I was trying to figure out the best place to ask about this:
wasm-bindgen has good reasons for making JsValue non sync/send, so probably not there
- I was going to post in
futures_util, but
- it felt like
LocalShared would parallel spawn_local which is here (edit: wasm-bindgen-futures) and not in tokio/futures
Edit: Oops, I thought wasm_bindgen_futures was a different repo and didn't notice.
JsValueisn'tSend/Syncsince #955 . This prevents the use of OnceCell-like things andfutures_util'sShared. I may hack up my own in the meantime, but would it make sense to have a similarLocalSharedthat can't be sent across threads?I was trying to figure out the best place to ask about this:
wasm-bindgenhas good reasons for making JsValue non sync/send, so probably not therefutures_util, butLocalSharedwould parallelspawn_localwhich is here (edit: wasm-bindgen-futures) and not in tokio/futuresEdit: Oops, I thought
wasm_bindgen_futureswas a different repo and didn't notice.