المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Multi-Threading



C# Programming
08-15-2013, 04:52 PM
Dear C# enthusiasts,

I am currently developing a C# application that controls some test equipment and performs functional tests on a product. This type of application is inherently sequential in nature so I have thus far avoided muddying the water with issues of multi-threading.

However, I am dissatisfied with my programs because the UI is not responsive while my functional test loop is running. At the moment the limit of my programming skill only allows for dirty calls to Application.DoEvents() in order to process data on my UI as the test is executing.

It seems, then, that whilst my program is inherently sequential I would benefit from having the UI and the test loop running concurrently. And now we arrive at the core of my question:

What multi-threading method is the path of least resistance for this kind of application given that I am not very experienced in C#?

So far I have read about the background worker and tasks. My understanding is that tasks are the way forwards for .net developers and that it's becoming very important to have a grasp of them. I read some articles about it here on Code Project but unfortunately I have found them difficult to follow. That is a reflection upon my level of competency, not the articles themselves.

I am willing to persevere with tasks to gain full understanding but only if that knowledge is likely to be of significant benefit to me in the future.

Advice and comments are welcome.

Thanks,

Brian.
Electronics Engineer, Computer Programmer and general GEEK.