Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Tiny PR) Show JsValue is not Send/Sync explicitly #3735

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,16 @@ impl JsValue {
}
}

/// The JsValue type wraps a slab/heap of js objects which is managed by
/// the wasm-bindgen shim, and everything here is not actually able to cross
/// any thread boundaries. When wasm actually has threads, for example, each
/// thread will have to have its own slab of objects generated by
/// wasm-bindgen, and indices in one slab aren't valid in any other slabs.
impl !Send for JsValue {}

/// Please refer to `!Send` for documentation.
impl !Sync for JsValue {}

impl PartialEq for JsValue {
/// Compares two `JsValue`s for equality, using the `===` operator in JS.
///
Expand Down
Loading