| 264 | PyDoc_STRVAR(SetNumThreads__doc__, |
| 265 | "Sets a maximum number of threads to be used in operations. Returns old value.\n"); |
| 266 | static PyObject* |
| 267 | PySet_num_threads(PyObject *self, PyObject *args) { |
| 268 | int n_threads_new, n_threads_old; |
| 269 | if (!PyArg_ParseTuple(args, "i", &n_threads_new)) |
| 270 | return NULL; |
| 271 | |
| 272 | pthread_mutex_lock(&gs.global_mutex); |
| 273 | n_threads_old = numexpr_set_nthreads(n_threads_new); |
| 274 | pthread_mutex_unlock(&gs.global_mutex); |
| 275 | return Py_BuildValue("i", n_threads_old); |
| 276 | } |
| 277 | |
| 278 | PyDoc_STRVAR(GetNumThreads__doc__, |
| 279 | "Gets a maximum number of threads to be used in operations.\n"); |
nothing calls this directly
no test coverage detected
searching dependent graphs…