[Numpy-svn] r3065 - trunk/numpy/core/src

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Aug 24 19:10:25 CDT 2006


Author: oliphant
Date: 2006-08-24 19:10:24 -0500 (Thu, 24 Aug 2006)
New Revision: 3065

Modified:
   trunk/numpy/core/src/multiarraymodule.c
Log:
Add allow threads code

Modified: trunk/numpy/core/src/multiarraymodule.c
===================================================================
--- trunk/numpy/core/src/multiarraymodule.c	2006-08-24 23:39:18 UTC (rev 3064)
+++ trunk/numpy/core/src/multiarraymodule.c	2006-08-25 00:10:24 UTC (rev 3065)
@@ -6477,11 +6477,13 @@
         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 {
 



More information about the Numpy-svn mailing list