Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to run Multiple threads
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01213236
Message ID:
01215232
Vues:
10
Hi Einar

>I did not want to muddy any waters I just wanted Gerard to be aware of the BackgroudWorker class.

Sure.

>I must disagree that the BackgroudWorker class was targeted for win forms. It is a class like anything else, it just happends to be in the toolbox and can easily be dropped onto a form.

Nope. It ensures thread affinity with the UI. This is the whole point of it - it ensures that if you reference form controls from within the RunWorkerCompleted event handler, the call has been marshalled from the background worker thread back to the thread on which the form is running. I would say this is pretty form specific.

>A "standard thread" also requires a method to run. 2 (or 3 or x) instances of the BackgroudWorker class can be hooked up to the same DoWork event.

Well, doing it your way, using my example code as a base, please show me how you can run both loops independent of each other in a single DoWork event handler.

>Anywho, I don't want to arge which one is better for Gerard, I just wanted to make Gerard aware of the BackgroudWorker class if he wasn't already.

Well you don't have to argue which one is better for Gerard but it would be nice to see you illustrate how the BackgroundWorker class will do what I illustrated, given that you disagree with my comments.

Cheers

-=Gary
-=Gary
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform