aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-26 17:53:49 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-26 17:53:49 +0200
commit41b49a16d62f5c759e4f8053cefa10b3f0390b31 (patch)
treee0a24fb8f1f96021220eb5fc894fccfac2247189 /sources/shiboken2/libshiboken
parentff94459c809e2ccd13e6d669b053667d35b3e571 (diff)
parent52f29458d7d6cb379d28d84021819516723d9169 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Diffstat (limited to 'sources/shiboken2/libshiboken')
-rw-r--r--sources/shiboken2/libshiboken/gilstate.cpp7
-rw-r--r--sources/shiboken2/libshiboken/gilstate.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/sources/shiboken2/libshiboken/gilstate.cpp b/sources/shiboken2/libshiboken/gilstate.cpp
index a59c6f01e..76a4d0e61 100644
--- a/sources/shiboken2/libshiboken/gilstate.cpp
+++ b/sources/shiboken2/libshiboken/gilstate.cpp
@@ -63,5 +63,12 @@ void GilState::release()
}
}
+// Abandon the lock: Only for special situations, like termination of a
+// POSIX thread (PYSIDE 1282).
+void GilState::abandon()
+{
+ m_locked = false;
+}
+
} // namespace Shiboken
diff --git a/sources/shiboken2/libshiboken/gilstate.h b/sources/shiboken2/libshiboken/gilstate.h
index d22f688ba..fbf39ead0 100644
--- a/sources/shiboken2/libshiboken/gilstate.h
+++ b/sources/shiboken2/libshiboken/gilstate.h
@@ -57,6 +57,7 @@ public:
GilState();
~GilState();
void release();
+ void abandon();
private:
PyGILState_STATE m_gstate;
bool m_locked = false;