summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/astra/PyIncludes.pxd2
-rw-r--r--python/astra/algorithm_c.pyx4
2 files changed, 4 insertions, 2 deletions
diff --git a/python/astra/PyIncludes.pxd b/python/astra/PyIncludes.pxd
index 909f58f..35dea5f 100644
--- a/python/astra/PyIncludes.pxd
+++ b/python/astra/PyIncludes.pxd
@@ -143,7 +143,7 @@ cdef extern from "astra/Float32ProjectionData2D.h" namespace "astra":
cdef extern from "astra/Algorithm.h" namespace "astra":
cdef cppclass CAlgorithm:
bool initialize(Config)
- void run(int)
+ void run(int) nogil
bool isInitialized()
cdef extern from "astra/ReconstructionAlgorithm2D.h" namespace "astra":
diff --git a/python/astra/algorithm_c.pyx b/python/astra/algorithm_c.pyx
index 966d3d7..3231c1f 100644
--- a/python/astra/algorithm_c.pyx
+++ b/python/astra/algorithm_c.pyx
@@ -73,7 +73,9 @@ cdef CAlgorithm * getAlg(i) except NULL:
def run(i, iterations=0):
cdef CAlgorithm * alg = getAlg(i)
- alg.run(iterations)
+ cdef int its = iterations
+ with nogil:
+ alg.run(its)
def get_res_norm(i):