You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 3, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 3, 2020. It is now read-only.
Recently, I've been messing around with the Runtime.js kernel. I've created a syscall that can allow a script to be evaluated in its own context. Here is the code:
Unfortunately, contexts can't run in parallel with other contexts in the same isolate (vm instance). They're like an iframes in the browser, have their own global objects, but share the same heap.
Activity
piranna commentedon Sep 19, 2017
Pretty interesting, seems it could be the basis for runtime.js Javascript-based processes :-) or at least threads :-P
RossComputerGuy commentedon Sep 19, 2017
Right now, it doesn't fully work. It returns
undefinedwhen I run__SYSCALL.evalContext({ print: (txt) => txt },"print(\"Hi\");")piranna commentedon Sep 19, 2017
Does it print?
RossComputerGuy commentedon Sep 19, 2017
No
iefserge commentedon Sep 19, 2017
Very cool, I think this would be similar to https://nodejs.org/api/vm.html#vm_vm_runinnewcontext_code_sandbox_options
Unfortunately, contexts can't run in parallel with other contexts in the same isolate (vm instance). They're like an iframes in the browser, have their own global objects, but share the same heap.