Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've noticed that that ArcGis Commands are activated asynchronously. So I supposed that there is a chance to corrupt memory without using thread locks when overriding Enabled void of custom ArcGis command. Am I right?

share|improve this question
add comment

1 Answer 1

ArcGIS is just a big single threaded application, all the enabled logic in the core commands and tools runs sequentially every 300ms. Since ArcObjects is blazingly fast it just gives the appearance that it happens all at once because these objects really aren't doing much. If you put complex IO in the enabled logic, you'll start getting wait cursors and sluggish performance which is why Esri recommends against it.

share|improve this answer
    
Actually at ArcGIS 10, ArcMap is a multi-threaded application, with separate threads for certain things such as basemap layers. Additionally background geoprocessing runs on a separate process entirely. Source: support.esri.com/en/knowledgebase/techarticles/detail/31903 –  blah238 Dec 6 '12 at 3:54
    
Additionally some UI elements such as add-in comboboxes seem to run on their own thread resulting in quirks as described in ArcGIS 10 add-in: ComboBox add-in component focus issue –  blah238 Dec 6 '12 at 3:56
    
Your combobox problem is more about the text control within it not giving up focus easily. Starting a new thread will kick it out as would have SendKeys.SendWait("{ESC}") before showing your messagebox. –  SeaJunk Dec 6 '12 at 23:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.