We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents df656ed + 230ccc7 commit a65a6d8Copy full SHA for a65a6d8
1 file changed
src/cpp/astar.cpp
@@ -83,7 +83,7 @@ static PyObject *astar(PyObject *self, PyObject *args) {
83
int start_j = start % w;
84
85
heuristic_ptr heuristic_func = select_heuristic(heuristic_override);
86
-
+ Py_BEGIN_ALLOW_THREADS
87
while (!nodes_to_visit.empty()) {
88
// .top() doesn't actually remove the node
89
Node cur = nodes_to_visit.top();
@@ -136,6 +136,7 @@ static PyObject *astar(PyObject *self, PyObject *args) {
136
}
137
138
139
+ Py_END_ALLOW_THREADS
140
141
PyObject *return_val;
142
if (path_length >= 0) {
0 commit comments