olivier57

GPEnv - Multithread

Discussion created by olivier57 on Sep 11, 2013
Hi,

I have a C# application that uses multithreading and GP Services for vector treatments. Initialization is a follows

IGPUtilities gpUtil = new GPUtilitiesClass();
IGPEnvironmentManager gpMng = new GPEnvironmentManagerClass();
IGPEnvironment gpEnv = new GPEnvironmentClass();
gpEnv.Name = "scratchWorkspace";
gpEnv.Value = (new DEWorkspaceTypeClass()).CreateValue(this.tempDir);
gpMng.AddEnvironment(gpEnv);
...


After this, several tools will be called inside different methods (one for each, with the same initialization).

- eliminate
- repair
- intersect

Each file will be accessed by only one thread sequentially for the differents tools but different threads run concurrently to treat different files (different zones/tiles).

I'm wondering if I have to use Mutex or other locking ways to avoid threads conflicts when using the same workspace "this.tempdir"


Thanks for answers,

Olivier

Outcomes