I used C# and ArcObjects to write 6 output tables in the same workspace. To improve the performance, I tried to do parallelization, each thread writing one table . Codes were pasted below.
Parallel.For(0, tableCount, k=>
{
//write kth table
writeTable(k);
}
But I got the error "can not acquire the lock....". It seems that workspace did not support multiple writing at the same time. Is there any other solutions?
You can see thi sample for set STA thread with TPL:
ParallelExtensionsExtras Tour – #5 – StaTaskScheduler | Parallel Programming with .NET
Thanks!
Finally, I wrote the tables as txt files, which allowed me to do the writing at the same time.