I am familiar with using the multiprocessing module in a stand-alone script with ArcMap at Python 2.7. However, I want to create a Python toolbox to be used from ArcGIS Pro and I want to know if I can still use the multiprocessing module or if there is another option. I am just not sure what will happen with the Python toolbox and the way the multiprocessing module starts new processes. Has anyone tried this?
Thanks,
Nathan
Solved! Go to Solution.
Yes you can. Myself and Duncan Hornby have posted before about what you need to do (in ArcMap, but it's pretty much the same for Pro), here and on GIS StackExchange (ie change the multiprocessing executable amongst other things). See arcgis 10.3 - Can multiprocessing with arcpy be run in a script tool? - Geographic Information Syste...
Now you're using python 3, I also recommend looking at the concurrent.futures module, a higher level interface to multiprocessing and threading.
are your planning to use arcmap or Pro?
This is from the arcmap help
Parallel processing with multiple CPUs—Help | ArcGIS Desktop
Parallel Processing Factor (Environment setting)—Help | ArcGIS Desktop
Similarly from the Pro help
Parallel processing with multiple CPUs—ArcGIS Pro | ArcGIS Desktop
Parallel Processing Factor (Environment setting)—Geoprocessing | ArcGIS Desktop
plus others
I want to use the multiprocessing module in ArcGIS Pro with a Python toolbox.
Yes you can. Myself and Duncan Hornby have posted before about what you need to do (in ArcMap, but it's pretty much the same for Pro), here and on GIS StackExchange (ie change the multiprocessing executable amongst other things). See arcgis 10.3 - Can multiprocessing with arcpy be run in a script tool? - Geographic Information Syste...
Now you're using python 3, I also recommend looking at the concurrent.futures module, a higher level interface to multiprocessing and threading.
Thanks for your help Luke!