Skip to content
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

Simplify interpreter design for only one interpreter #47

Closed
cnuernber opened this issue Jan 18, 2020 · 0 comments · Fixed by #51
Closed

Simplify interpreter design for only one interpreter #47

cnuernber opened this issue Jan 18, 2020 · 0 comments · Fixed by #51

Comments

@cnuernber
Copy link
Collaborator

This is both a robustness upgrade and performance upgrade. The current interpreter design was made as a midpoint between an single and multiple interpreter design. We have discussed a multiple interpreter design at length and decided it wasn't necessary. The best pathway past the GIL really is a subprocess and not a thread or multiple interpreters.

So it is time to revisit the interpreter design accounting for the fact that there will only be one interpreter. This is a major simplification of the library just right off the bat.

Also, the use of thread local variables can be somewhat optimized. Clojure's dynamic variables are extremely convenient but a concurrent thread local hash map (or potentially just an atomic long object) to indicate which thread owns the interpreter is both simple, fast, and fine.

This can be done without changing the external and I think most of the internal apis. Potentially just python/interpreter.clj.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant