summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2022-05-28 20:04:52 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2022-05-29 19:16:15 (GMT)
commit7dd27fca74e9a9aed22d27568f033a4b817a665b (patch)
tree730767f5eda7e8a4821ff4fef6566253c3e9c9ca /plugins
parent1792bd4d37121d452cb68aa23f9a1022f6022657 (diff)
Remove various accesses to the Python Global Interpreter Lock.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/pychrysalide/analysis/loaded.c5
-rw-r--r--plugins/pychrysalide/core/queue.c17
2 files changed, 0 insertions, 22 deletions
diff --git a/plugins/pychrysalide/analysis/loaded.c b/plugins/pychrysalide/analysis/loaded.c
index 89762d3..c8674a5 100644
--- a/plugins/pychrysalide/analysis/loaded.c
+++ b/plugins/pychrysalide/analysis/loaded.c
@@ -958,7 +958,6 @@ static PyObject *py_loaded_content_analyze_and_wait(PyObject *self, PyObject *ar
int connect; /* Connexion à la base ? */
int cache; /* Préparation de rendu ? */
int ret; /* Bilan de lecture des args. */
- PyThreadState *_save; /* Sauvegarde de contexte */
GLoadedContent *content; /* Version GLib de l'élément */
bool status; /* Bilan de l'opération */
@@ -993,12 +992,8 @@ static PyObject *py_loaded_content_analyze_and_wait(PyObject *self, PyObject *ar
content = G_LOADED_CONTENT(pygobject_get(self));
- Py_UNBLOCK_THREADS;
-
status = g_loaded_content_analyze_and_wait(content, connect, cache);
- Py_BLOCK_THREADS;
-
result = status ? Py_True : Py_False;
Py_INCREF(result);
diff --git a/plugins/pychrysalide/core/queue.c b/plugins/pychrysalide/core/queue.c
index d0fbed8..febf1b0 100644
--- a/plugins/pychrysalide/core/queue.c
+++ b/plugins/pychrysalide/core/queue.c
@@ -63,7 +63,6 @@ static PyObject *py_queue_wait_for_all_global_works(PyObject *, PyObject *);
static PyObject *py_queue_setup_global_work_group(PyObject *self, PyObject *args)
{
PyObject *result; /* Valeur à retourner */
- PyThreadState *_save; /* Sauvegarde de contexte */
wgroup_id_t wid; /* Identifiant de groupe */
#define QUEUE_SETUP_GLOBAL_WORK_GROUP_METHOD PYTHON_METHOD_DEF \
@@ -79,14 +78,10 @@ static PyObject *py_queue_setup_global_work_group(PyObject *self, PyObject *args
" unique identifier of a work group." \
)
- Py_UNBLOCK_THREADS;
-
wid = setup_global_work_group();
result = PyLong_FromUnsignedLongLong(wid);
- Py_BLOCK_THREADS;
-
return result;
}
@@ -109,8 +104,6 @@ static PyObject *py_queue_setup_tiny_global_work_group(PyObject *self, PyObject
{
PyObject *result; /* Valeur à retourner */
unsigned int count; /* Nombre de thread parallèle */
- PyThreadState *_save; /* Sauvegarde de contexte */
-
int ret; /* Bilan de lecture des args. */
wgroup_id_t wid; /* Identifiant de groupe */
@@ -131,8 +124,6 @@ static PyObject *py_queue_setup_tiny_global_work_group(PyObject *self, PyObject
count = 1;
- Py_UNBLOCK_THREADS;
-
ret = PyArg_ParseTuple(args, "|I", &count);
if (!ret) goto exit;
@@ -148,8 +139,6 @@ static PyObject *py_queue_setup_tiny_global_work_group(PyObject *self, PyObject
exit:
- Py_BLOCK_THREADS;
-
return result;
}
@@ -170,8 +159,6 @@ static PyObject *py_queue_setup_tiny_global_work_group(PyObject *self, PyObject
static PyObject *py_queue_wait_for_all_global_works(PyObject *self, PyObject *args)
{
- PyThreadState *_save; /* Sauvegarde de contexte */
-
#define QUEUE_WAIT_FOR_ALL_GLOBAL_WORKS_METHOD PYTHON_METHOD_DEF \
( \
wait_for_all_global_works, "", \
@@ -179,12 +166,8 @@ static PyObject *py_queue_wait_for_all_global_works(PyObject *self, PyObject *ar
"Wait for all global tasks being processed." \
)
- Py_UNBLOCK_THREADS;
-
wait_for_all_global_works();
- Py_BLOCK_THREADS;
-
Py_RETURN_NONE;
}