Multithreading on the single JSRuntime with different JSContext? #1141
-
I have a use case to run tasks on multiple contexts in parallel. The question is: does it support executing And one more question is: how much is the overhead difference between single-context runtime vs multi-context runtime per context? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No.
You mean how much overhead JSRuntime adds? Not much, but that's arguably the wrong question to ask because multiple JSContexts aren't supported as a memory-saving feature but to make it possible for embedders to implement Realms. Browser example: main page vs. iframes; different execution contexts but they're accessible to each other. |
Beta Was this translation helpful? Give feedback.
No.
You mean how much overhead JSRuntime adds? Not much, but that's arguably the wrong question to ask because multiple JSContexts aren't supported as a memory-saving feature but to make it possible for embedders to implement Realms.
Browser example: main page vs. iframes; different execution contexts but they're accessible to each other.