The first call to git_revwalk_next may take a while to complete in large repositories – sometimes a couple of seconds.
This PR releases the Global Interpreter Lock (GIL) during git_revwalk_next to avoid locking up multithreaded applications. (Note: cffi wraps C function calls in a similar fashion.)
A possible use case for this is to keep a GUI application responsive while a background thread is iterating on a Walker. Before this change, pygit2 would hold onto the GIL while calling into git_revwalk_next, causing the UI thread to freeze.
The first call to
git_revwalk_next
may take a while to complete in large repositories – sometimes a couple of seconds.This PR releases the Global Interpreter Lock (GIL) during
git_revwalk_next
to avoid locking up multithreaded applications. (Note: cffi wraps C function calls in a similar fashion.)A possible use case for this is to keep a GUI application responsive while a background thread is iterating on a Walker. Before this change, pygit2 would hold onto the GIL while calling into git_revwalk_next, causing the UI thread to freeze.