mirror of
https://github.com/loot/libloot-python.git
synced 2026-07-27 14:14:13 -07:00
pybind11 holds the GIL whenever a C++ function is called from Python, so the logging callback can't then execute Python code. To avoid this problem, release the GIL for every function bound by pybind11 (in case log statements are added to those that don't currently have any), and wrap the logging callback in a lambda function that first aquires the GIL lock for the function's scope.