pyvips icon indicating copy to clipboard operation
pyvips copied to clipboard

question: does pyvips lock the GIL?

Open machineonamission opened this issue 1 year ago • 1 comments

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

machineonamission avatar Sep 18 '24 03:09 machineonamission

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.

jcupitt avatar Sep 18 '24 03:09 jcupitt