Skip to content

LocalShared similar to futures_util's Shared #4780

@andrewbaxter

Description

@andrewbaxter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions