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

Allow single threaded use of Python #48

Closed
cnuernber opened this issue Jan 18, 2020 · 0 comments
Closed

Allow single threaded use of Python #48

cnuernber opened this issue Jan 18, 2020 · 0 comments

Comments

@cnuernber
Copy link
Collaborator

Not all python libraries tolerate multithreaded access well, even when serialized by a GIL. Some, for instance, use static/thread-local variables in a way as to make then unsafe to use from multiple threads.

We want to make purely single threaded access possible when necessary for robustness. It should be possible to load python and use it from an agent and guarantee all python access is from one thread.

One potential soution is a custom gc release-refcount queue that is cleared at the beginning or end of with-gil.

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

No branches or pull requests

1 participant