mdbartos / pysheds

:earth_americas: Simple and fast watershed delineation in python.
GNU General Public License v3.0
708 stars 191 forks source link

Cannot use pysheds with multiprocessing #202

Open AndreaLibe opened 2 years ago

AndreaLibe commented 2 years ago

I am implementing a flooding module that require the calculation of a lot of hand maps. I have try to paralellize the hand definition by using multiprocessing, but it's not considered thread-safe due to the use of numba and even if I use it in "spawn" mode it often loos the control over the sub-processes. Is not possible to allow the user to de-activate the multithreading of pysheds? I have tried to do it using the old pgrid, but the structure of the function is completely different!