Skip to content

Commit b57071a

Browse files
bertskyRobert Sachunsky
andauthored
run AnalyseLayout() without GIL (#382)
Co-authored-by: Robert Sachunsky <sachunsky@informatik.uni-leipzig.de>
1 parent f2aeec0 commit b57071a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tesserocr/tesserocr.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2121,7 +2121,8 @@ cdef class PyTessBaseAPI:
21212121
:class:`PyPageIterator`: Page iterator or `None` on error or an empty page.
21222122
"""
21232123
cdef PageIterator *piter
2124-
piter = self._baseapi.AnalyseLayout(merge_similar_words)
2124+
with nogil:
2125+
piter = self._baseapi.AnalyseLayout(merge_similar_words)
21252126
if piter == NULL:
21262127
return None
21272128
return PyPageIterator.createPageIterator(piter)

0 commit comments

Comments
 (0)