Threading for dummies (i.e. me)

It would be really handy if the compiler could tell when you have written code to access UI components in one of the external thread processes of the BackgroundWorker component, such as DoWork. (Yes, the debugger tells you when you messed up… just not the compiler.)

Luckily at least some of these are caught in runtime.

I will have to write myself a little reminder comment in these methods NO UI ACCESS HERE, DUMM-DUMM! I think that I will get over this very quickly though., as I get more and more used to working with asynch processes.

You, too, can write asynch processes (almost) easily in VS2005 now with the BackgroundWorker component. But you still have to know what you are doing and pay attention. You don’t need to know threading inside and out – but have an awareness of it.



Don’t Forget: www.acehaid.org

  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.