libvips / pyvips

python binding for libvips using cffi
MIT License
636 stars 49 forks source link

question: does pyvips lock the GIL? #504

Open reticivis-net opened 2 weeks ago

reticivis-net commented 2 weeks ago

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 commented 2 weeks ago

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.