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

question: does pyvips lock the GIL? #504

Open
machineonamission opened this issue Sep 18, 2024 · 1 comment
Open

question: does pyvips lock the GIL? #504

machineonamission opened this issue Sep 18, 2024 · 1 comment

Comments

@machineonamission
Copy link

If i were to call libvips functions inside an async loop using a ThreadPoolExecutor, would it block the main loop? or should I use a ProcessPoolExecutor

@jcupitt
Copy link
Member

jcupitt commented Sep 18, 2024

pyvips doesn't lock the GIL itself, but I think cffi (pyvips uses this to call into the libvips binary) will lock around each call. You should check, of course.

Most libvips calls are quick, but it will block during things like write_to_file, or max.

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

2 participants