-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Isolation and sharing between contexts #3148
Comments
Let's answer your question on
|
To answer your general question about cross context:
Any
Yes, they share the same reference count for
Yes
The only gotchas is that using Note that I didn't use share in my answer above, just because the word share in The purpose of this language feature is to enable concurrent access to a shared buffers between threads. You can use |
Thanks a ton! I believe this answers all of my questions. |
There was a previous discussion regarding this (#2092), when marshalling fields between contexts had just become more permissive, but I still had some questions that remained.
Baseline: to what extent do contexts on the same thread and runtime share data?
Perhaps it's easier the name the things that are not shared?
Since
JsCreateSharedArrayBufferWithSharedContent
was recently implemented, I can only assume there are some limitations.The catalyst for this discussion stems from chakracore-rs#14 — how to manage
JsRelease
in destructors.JsRelease
requires an active context, and this cannot be ensured in destructors withchakracore-rs
current implementation. Therefore I was contemplating whether a default context could be used to supportJsRelease
(for cases when the user no longer have any active contexts).The text was updated successfully, but these errors were encountered: