-
Notifications
You must be signed in to change notification settings - Fork 314
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
Workerd side of python isolate pool #2936
Conversation
7609106
to
b3d8a00
Compare
src/pyodide/types/emscripten.d.ts
Outdated
@@ -68,4 +68,8 @@ interface Module { | |||
addRunDependency(x: string): void; | |||
removeRunDependency(x: string): void; | |||
noInitialRun: boolean; | |||
setUnsafeEval(mod: typeof import('internal:unsafe-eval').default): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type imports must be here instead of an import statement because we use this file as an "ambient" type declaration.
See https://stackoverflow.com/questions/39040108/import-class-in-definition-file-d-ts
1deb2c2
to
e4e608b
Compare
bc1543a
to
1a87fae
Compare
2e46939
to
05e7568
Compare
d166d95
to
97bfb3a
Compare
9a5a6ee
to
550e085
Compare
9272eae
to
7e32820
Compare
The generated output of |
7e32820
to
d724cad
Compare
d724cad
to
c876e52
Compare
This commit moves the emscripten and pyodide initialization step to the API constructor to enable creation of python isolate pools.
@@ -490,7 +490,7 @@ jsg::JsValue SetupEmscripten::getModule(jsg::Lock& js) { | |||
} | |||
|
|||
void SetupEmscripten::visitForGc(jsg::GcVisitor& visitor) { | |||
visitor.visit(emscriptenRuntime.emscriptenRuntime); | |||
visitor.visit(const_cast<EmscriptenRuntime&>(emscriptenRuntime).emscriptenRuntime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: might be worth writing a comment why this cast is necessary and why it's safe
No description provided.