Parallel Processing with Python Toolboxes in ArcGIS Pro

1944
4
Jump to solution
04-16-2019 06:00 PM
NathanHeickLACSD
Occasional Contributor III

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

1 Solution

Accepted Solutions
Luke_Pinner
MVP Regular Contributor

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.

View solution in original post

4 Replies
NathanHeickLACSD
Occasional Contributor III

I want to use the multiprocessing module in ArcGIS Pro with a Python toolbox.

0 Kudos
Luke_Pinner
MVP Regular Contributor

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.

NathanHeickLACSD
Occasional Contributor III

Thanks for your help Luke!

0 Kudos