diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-08-25 00:10:24 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-08-25 00:10:24 +0000 |
commit | 2266ec69c890a1be820f1c519ffa79e5372dd084 (patch) | |
tree | e7fa7e6a0cefd04b9e3a30dd958595ec765194bd | |
parent | a15155fed63c2c032197eb689931e731944ff090 (diff) | |
download | numpy-2266ec69c890a1be820f1c519ffa79e5372dd084.tar.gz |
Add allow threads code
-rw-r--r-- | numpy/core/src/multiarraymodule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/core/src/multiarraymodule.c b/numpy/core/src/multiarraymodule.c index 87189cd3a..01660e4b2 100644 --- a/numpy/core/src/multiarraymodule.c +++ b/numpy/core/src/multiarraymodule.c @@ -6477,11 +6477,13 @@ test_interrupt(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "|i", &kind)) return NULL; if (kind) { + Py_BEGIN_ALLOW_THREADS while (a>=0) { if ((a % 1000 == 0) && PyOS_InterruptOccurred()) break; a+=1; } + Py_END_ALLOW_THREADS } else { |