Skip to content

Commit

Permalink
Add allow threads code
Browse files Browse the repository at this point in the history
  • Loading branch information
teoliphant committed Aug 25, 2006
1 parent a15155f commit 2266ec6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions numpy/core/src/multiarraymodule.c
Expand Up @@ -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 {

Expand Down

0 comments on commit 2266ec6

Please sign in to comment.