diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-01-25 07:43:52 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-01-25 07:43:52 (GMT) |
commit | 62da8564d257af381acb606e98fc712d87f7f5cb (patch) | |
tree | 97790b9c17d09f6e9e12722f7431a5408aa77184 /plugins/pychrysalide/analysis | |
parent | d0a287a4e57b299cec22c94b028e3553d5b36fcd (diff) |
Released the Python global lock while waiting for an analysis.
Diffstat (limited to 'plugins/pychrysalide/analysis')
-rw-r--r-- | plugins/pychrysalide/analysis/loaded.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/pychrysalide/analysis/loaded.c b/plugins/pychrysalide/analysis/loaded.c index 6801ec3..dd236ed 100644 --- a/plugins/pychrysalide/analysis/loaded.c +++ b/plugins/pychrysalide/analysis/loaded.c @@ -99,13 +99,18 @@ static PyObject *py_loaded_content_analyze(PyObject *self, PyObject *args) static PyObject *py_loaded_content_analyze_and_wait(PyObject *self, PyObject *args) { PyObject *result; /* Bilan à retourner */ + PyThreadState *_save; /* Sauvegarde de contexte */ GLoadedContent *content; /* Version GLib de l'élément */ bool status; /* Bilan de l'opération */ content = G_LOADED_CONTENT(pygobject_get(self)); + Py_UNBLOCK_THREADS; + status = g_loaded_content_analyze_and_wait(content); + Py_BLOCK_THREADS; + result = status ? Py_True : Py_False; Py_INCREF(result); |