1 May
2015
1 May
'15
11:52 p.m.
Le 01/05/2015 02:35, Steven D'Aprano a écrit :
If you still wish to argue for this, one thing which may help your case is if you can identify other programming languages that have already done something similar.
Cython has prange. It replaces range() in the for loop but runs the loop body in parallel using openmp: from cython.parallel import prange cdef int func(Py_ssize_t n): 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 This is an example from the cython documentation: http://docs.cython.org/src/userguide/parallelism.html Joseph