zeehio / parmap

Easy to use map and starmap python equivalents
Apache License 2.0
144 stars 9 forks source link

Shared Variable with parmap #17

Open Strizzi12 opened 6 years ago

Strizzi12 commented 6 years ago

Is there a way to share a global variable that is writeable from all parallel tasks?

zeehio commented 6 years ago

Not that I know of... Each parallel task has its own memory space.

While it may be possible to do that with multiprocessing, it may not be easy. Pull requests are welcome if you can make it work...

https://stackoverflow.com/questions/11215554/globals-variables-and-python-multiprocessing?lq=1