[Networkit] parallel Graph iterators for Python

Michael Hamann michael.hamann at kit.edu
Thu Nov 19 17:10:26 CET 2015


On Thursday 19 November 2015 09:56:40, Christian Staudt wrote:
> What about the Cython level then? If I have a simple function (see example
> below) and put it inside a .pyx file, would it work with the parallel
> iterator?

No, only if it would not require the GIL, i.e. if you declared the method with 
nogil. Note that without the GIL you must declare all variables using cdef and 
that what you can do with Python objects is very limited, i.e. basically you 
can only access cdef properties and methods declared as nogil and you cannot 
create any Python objects. The Cython compilation should fail if you do 
anything in a nogil method that requires the GIL.

Best regards,

More information about the NetworKit mailing list