blob: e7445082d8b0b7965ebad6411198cd8a02a1ea50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
from cython.parallel import prange
cdef int func(Py_ssize_t n) except -1:
cdef Py_ssize_t i
for i in prange(n, nogil=True):
if i == 8:
with gil:
raise Exception()
elif i == 4:
break
elif i == 2:
return i
|