-
Notifications
You must be signed in to change notification settings - Fork 300
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
[DRAFT] [WIP] python isolate pool #2936
base: main
Are you sure you want to change the base?
Conversation
src/pyodide/BUILD.bazel
Outdated
] + glob( | ||
[ | ||
"internal/*.ts", | ||
"internal/topLevelEntropy/*.ts", | ||
# The pool directory is only needed by typescript, it shouldn't be used at runtime. | ||
"internal/pool/*.ts", | ||
# "internal/pool/*.ts", |
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.
We should run tsc --noEmit
on this directory to make sure that our types are correct. Probably alongside the esbuild command, since esbuild by itself ignores types.
7609106
to
b3d8a00
Compare
@@ -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
05e7568
to
a713a7d
Compare
6dd801a
to
a9fd4fc
Compare
a713a7d
to
bfcb8be
Compare
af0eecf
to
aa23635
Compare
e661e30
to
264d94b
Compare
@@ -128,6 +129,92 @@ static const PythonConfig defaultConfig{ | |||
}; | |||
} // namespace | |||
|
|||
namespace { |
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.
Note for code review:
No changes to anything in this namespace scope, this is only a move from below because I need these functions earlier in the file
Move ownership of metrics and limitEnforcer to the api type. Currently ownership is shared even though the Isolate class encapsulates the api class. Moving complete ownership to the underlying api class allows the isolate class to be constructed in a different scope to the api class. This is useful for preinitialization of the api class before a request has come in. Add updateConfiguration function to jsg Isolates This can be used to update the given configuration at runtime. Note that while some jsg structs are lazily using the configuration, others can use it at construction and will have the original configuration value.
264d94b
to
712733a
Compare
Removing from draft stage as this is pretty much the end state of this PR. |
No description provided.