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

Review blocking behavior in Python API #127

Open
sgherbst opened this issue Nov 3, 2023 · 0 comments
Open

Review blocking behavior in Python API #127

sgherbst opened this issue Nov 3, 2023 · 0 comments

Comments

@sgherbst
Copy link
Contributor

sgherbst commented Nov 3, 2023

I noticed an issue that may be GIL-related. Let's say that a separate Python thread is spun up that periodically tries to connect to a server (e.g., run_client). Then, we call a blocking UMI read(). I think that the read() call will block other Python threads from running due to the GIL. However, it will never receive any data, because that is dependent on the client connecting in a separate thread! The main workaround I found is to use multiprocessing.Process instead of threading.Thread. However, I think this behavior is fairly non-intuitive. It would be great to figure out how to make the Python API more friendly to threading.

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