Use PyGILState_GetThisThreadState when using gil_scoped_acquire. (#1211)

This avoids GIL deadlocking when pybind11 tries to acquire the GIL in a thread that already acquired it using standard Python API (e.g. when running from a Python thread).
This commit is contained in:
Borja Zarco
2018-12-01 08:47:40 -05:00
committed by Wenzel Jakob
parent 81da9888c7
commit e2b884c33b
4 changed files with 133 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ set(PYBIND11_TEST_FILES
test_eval.cpp
test_exceptions.cpp
test_factory_constructors.cpp
test_gil_scoped.cpp
test_iostream.cpp
test_kwargs_and_defaults.cpp
test_local_bindings.cpp