diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2022-05-28 20:04:52 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2022-05-29 19:16:15 (GMT) |
commit | 7dd27fca74e9a9aed22d27568f033a4b817a665b (patch) | |
tree | 730767f5eda7e8a4821ff4fef6566253c3e9c9ca /plugins/pychrysalide/core | |
parent | 1792bd4d37121d452cb68aa23f9a1022f6022657 (diff) |
Remove various accesses to the Python Global Interpreter Lock.
Diffstat (limited to 'plugins/pychrysalide/core')
-rw-r--r-- | plugins/pychrysalide/core/queue.c | 17 |
1 files changed, 0 insertions, 17 deletions
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; } |