Select to view content in your preferred language

How to use a featureclass in mutithreaded environment

829
1
07-23-2010 08:04 AM
AnilDhiman
Deactivated User
I went through few links saying that, for multithreaded applications, user should avoid cross threaded apartment calls to reduce marshallings. For e.g. creating a featureclass on main thread and passing it to child threads may cause these calls to occur and hence, degrade the performance.

I tried to deep clone Ifeatureclass using ESRI IClonable interface and then use IPersistStream to serialize it, but did went thru some errors.

I got one error "Value does not fall in expected range" while cloning a cloneableclass containing a feature class...

Any suggestions !!
0 Kudos
1 Reply
AnilDhiman
Deactivated User
I went through few links saying that, for multithreaded applications, user should avoid cross threaded apartment calls to reduce marshallings. For e.g. creating a featureclass on main thread and passing it to child threads may cause these calls to occur and hence, degrade the performance.

I tried to deep clone Ifeatureclass using ESRI IClonable interface and then use IPersistStream to serialize it, but did went thru some errors.

I got one error "Value does not fall in expected range" while cloning a cloneableclass containing a feature class...

Any suggestions !!

Just got to know that for Deep cloning , IObjectCopy can be used but because Ifeatureclass does not implement IPersistStream,, so I guess deep cloning of feature class is not possible.

Please suggest any other way to achieve this
0 Kudos