summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-08-25 00:10:24 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-08-25 00:10:24 +0000
commit2266ec69c890a1be820f1c519ffa79e5372dd084 (patch)
treee7fa7e6a0cefd04b9e3a30dd958595ec765194bd
parenta15155fed63c2c032197eb689931e731944ff090 (diff)
downloadnumpy-2266ec69c890a1be820f1c519ffa79e5372dd084.tar.gz
Add allow threads code
-rw-r--r--numpy/core/src/multiarraymodule.c2
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 {