English

FAQ: Can multiple geoprocessor objects be created and used within an application?

Question

Can multiple geoprocessor objects be created and used within an application?

Answer

Creating multiple geoprocessor objects within the same application is not recommended. Using multiple geoprocessor (GP) objects within an application or within different threads within an application may cause odd and unpredictable behavior, such as properties changed on one geoprocessor being updated across all geoprocessor objects being used.

The geoprocessor (GP) object is created using arcgisscripting.create(). At ArcGIS 10, the arcpy module uses the geoprocessor module internally; therefore, the same recommendation applies - arcpy should not be imported in the same application that a geoprocessor object is created.