-
Notifications
You must be signed in to change notification settings - Fork 7
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
Thread pool of pre-loaded VMs #2
Comments
Doesn't V8 have it's own GIL? What would happen if you initialize multiple VMs inside a process? |
It's explained in the docs. You can run multiple VMs, each has its own GIL. |
Oh that's really cool. I didn't know that it was possible. If you try to do the same with Python you're going to encounter some nasty issues. |
Yes, the alternative (in Python) is to spawn a child process. V8's devs could have done the same to work around the GIL, but instead they added the concept of |
I thought that it's not possible since in MRI Ruby you are not allowed to use more than one V8 VM in one process. |
I guess it must be a limitation of the gem (therubyracer?), maybe it's built on top of an older V8. |
Actually ExecJS disallows it and both therubyracer and miniracer don't support it. Kudos on having that already built in. |
Would allow to run JS code in parallel. Should support asyncio. Should be transparent (ie: same API as for managing one VM)
The text was updated successfully, but these errors were encountered: