diff options
Diffstat (limited to 'libpyside/pyside.cpp')
-rw-r--r-- | libpyside/pyside.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libpyside/pyside.cpp b/libpyside/pyside.cpp index 4f26204b1..3d47b8691 100644 --- a/libpyside/pyside.cpp +++ b/libpyside/pyside.cpp @@ -151,7 +151,12 @@ void destroyQCoreApplication() bm.visitAllPyObjects(&destructionVisitor, &data); // in the end destroy app + // Allow threads because the destructor calls + // QThreadPool::globalInstance().waitForDone() which may deadlock on the GIL + // if there is a worker working with python objects. + Py_BEGIN_ALLOW_THREADS delete app; + Py_END_ALLOW_THREADS } struct TypeUserData { |